October: Data-table on data-request-update

Created on 13 Feb 2019  路  10Comments  路  Source: octobercms/october

Data-table on data-request-update
data-request-update="'{{ __SELF__ }}::usertickets': '#usertickets'"
@LukeTowers it update the partial (having table) but it hides the Data-table, kindly look at the matter.
rest all the work is ok... just datatable not working

Question

Most helpful comment

@bennothommo could you look at this bug, if you have a minute 馃槃

All 10 comments

@bennothommo could you look at this bug, if you have a minute 馃槃

@w20k will do :)

@ImadUllah Could you please provide some more info on how you using the data-request AJAX functionality? Is this a partial inside a form or in a preview?

@bennothommo!
No it is a partial having a table(bootstrap data-table) when i create or delete or update a record and update that partial it doesn't shows data table...

it update the records but hides the data-table

when i hide the edit form partial and shows the updated records in table partial but it hide the bootstrap data-table

@ImadUllah You will need to check what your component's usertickets() method is returning. That is what is inserted into the #usertickets element.

it gives the records correctly but hides the data-table,
$this->page['created']=Ticket::where('users_id',Auth::getUser()->id)->get();
records in data-table
with out data-table

@ImadUllah I'm not sure which data table plugin you are using, but I would say that if you needed to call a jQuery function to enable the data-table feature on the original table, you would need to call that same function again to enable the feature on the new table as the content of the partial would've changed after the AJAX request executed. You can use the data-request-success attribute to specify JavaScript that runs after the AJAX call completes.

Also, please note that GitHub is not the best place for support - I would recommend asking for support on the October forums or Slack. Please see this page: https://octobercms.com/support

@w20k This is not a bug, in case you need to change the labels :)

@bennothommo Thanks a lot for your time ;) Changed!

@ImadUllah guess this issue could be closed?

Was this page helpful?
0 / 5 - 0 ratings