Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Good day, I have a dynamic table on Bootstrap #623

Closed
grad23 opened this issue Jul 15, 2018 · 5 comments
Closed

Good day, I have a dynamic table on Bootstrap #623

grad23 opened this issue Jul 15, 2018 · 5 comments
Labels

Comments

@grad23
Copy link

grad23 commented Jul 15, 2018

Good day, I have a dynamic table on Bootstrap, is it possible to use TableFilter for such tables? Now it simply reports that at least 1 row is needed for the work, although the data is loaded into the table. Data is loaded via AJAX. Thanks and waiting for reply. grad23@yandex.by

@koalyptus
Copy link
Owner

koalyptus commented Jul 16, 2018

@grad23 make sure you instantiate TableFilter when the async request has completed and the table rows are effectively rendered. From what you describe it seems to be a timing issue related to AJAX.

@grad23
Copy link
Author

grad23 commented Jul 16, 2018

Ok, more or less managed to make friends filter and table, but when pagination from bootstrap-table data selection is not for all values of the table, but only for those displayed on the page. For example, in the table of 100 values from 0 to 99, the pagination bootstrap-table = 10 values on the page, respectively, the "5" filter finds and shows, and 11 (which on the next page) does not see.
And the second, after setting the value of col_2: 'select', (col_2 = field_id as the simplest without using the formatter) instead of the list of values gives an error.
Uncaught TypeError: Cannot read property 'cells' of undefined
at dropdown.js:218
at tablefilter.js:2828
at Dropdown.build (dropdown.js:188)
at Dropdown.onSlcFocus (dropdown.js:60)
at HTMLSelectElement. (dropdown.js:127)

image

@grad23
Copy link
Author

grad23 commented Jul 16, 2018

I put script for table-filter in to .on('load-success.bs.table', function (e, data, row, value) { , so all data are loaded by AJAX before...

@koalyptus
Copy link
Owner

If you publish an example reproducing the issue on codepen or equivalent, I will be able to understand a little bit more.

@koalyptus
Copy link
Owner

can be re-opened if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants