filter-control select initialized with var: throws exception when using reorder-columns
Author: robertocarlosCreated Mar 13, 2026Updated Aug 8, 2026
Labelsfilter-controlhas PRBug
Bootstraptable version(s) affected
1.27.0
Description
When using filter-control of type select initialized via 'var' together with reorder-columns, the following exception occurs:
Uncaught TypeError: can't access property "length", e is undefined
It seems that during the column reorder process the filter-control logic tries to read the options from a field that is no longer a (possibly an that temporarily occupies the same position).
Because of this, getOptionsFromSelectControl receives an element that does not have options, which results in the exception when accessing options.length.
Steps to reproduce
- Enable filterControl
- Use a select filter initialized with data-filter-data="var:...".
- Enable reorderableColumns
- Drag the column that contains the select filter
Result
The following error is thrown in the console:
Uncaught TypeError: can't access property "length", e is undefined
Expected behaviorReproduction example
Live example reproducing the issue:
https://live.bootstrap-table.com/code/robertocarlos/19126
Example(s)
No response
Possible Solutions
No response
Additional Context
No response
Source: wenzhixin/bootstrap-table