bootstrap-table
bootstrap-table copied to clipboard
data-height breaks filter-control
Bootstraptable version(s) affected
1.21.3
Description
Hee guys,
I found out that using data-height attribute breaks the select using it along with select2 or multi-select. After applying data-height, clicking on the dropdown won't open any window. Removing the data-height, makes the filter-control work again. The default select (filter-control) works without issues.
Example(s)
Below an existing example with filter-control integrated with select2 select2 working example by wenzhixin
Add the folowing data-height attribute to the table and the dropdown does not open anymore for Status.
data-height="530"
I've also tested this with the multi-select feature which is in the concept phase (saw a big thread on it) multi-select working example
Add the folowing data-height attribute to the table and the dropdown does not open anymore for City.
data-height="530"
Possible Solutions
No response
Additional Context
No response
I have a similar issue. I didn't realize the data-height was an issue, but the filters no longer showed the active filter. I could dropdown and select filters, and they would stay in place, but it was throwing some of us off. I removed the data-height setting and the filters now show what was selected and reduced some confusion.
@DataSupplier I think that might be related to #5713 which is already closed but has reappeared. I tried to find the error for this issue but I couldn't get enough overview over the project to understand what is really happening. What I assume is that when data-height is set, they generate identical filter elements "above" the actual filter elements that keep their position at the screen when scrolled, whilst the actual filter elements disappear from the screen. This probably leeds to several bugs if these elements are not correctly synchronised. Just an assumption, but I think that is what's causing the problems with data-height.
I am having the same issue. Using the filterControl:"select" option, the selected="selected" attribute on the option element is lost when there is a set data-height for the table. The filter is working, the select is just not showing/retraining what was selected. This only happens if the data-height is set...
This issue is also happening when enabling pagination #6735