bootstrap-table icon indicating copy to clipboard operation
bootstrap-table copied to clipboard

Filter Control Extension - Selects do not always open

Open MathieuSaintes opened this issue 3 years ago • 5 comments

Bootstraptable version(s) affected

1.20.2

Description

Filter-control selects do not open on columns with data-field attribute including blank space

Example(s)

https://live.bootstrap-table.com/code/MathieuSaintes/12458

Possible Solutions

No response

Additional Context

No response

MathieuSaintes avatar Aug 18 '22 07:08 MathieuSaintes

Please provide us an example using our editor.

UtechtDustin avatar Aug 18 '22 07:08 UtechtDustin

Okay, already updated the initial comment

MathieuSaintes avatar Aug 18 '22 09:08 MathieuSaintes

I can reproduce it with your example, but im not sure why someone should use blank spaces as field. Please describe your usecase and why we should support blank spaces.

UtechtDustin avatar Aug 18 '22 09:08 UtechtDustin

I was initially using the table header content as field, like in the following example, and I noticed the select would not open on the columns with more-than-1-word headers. https://stackoverflow.com/questions/59994125/bootstrap-table-not-showing-some-filters

I later understood the problem was with the blank space in the data-field. I used a dictionary associating data-fields without blank spaces to column headers to solve the problem.

I would say it would avoid some trouble to the users to add in the description of the table filter control that the data-field column option must be defined for all the columns to be filters, and that it can't include blank space.

Supporting blank spaces would allow to use same value for columns headers and data-field option.

MathieuSaintes avatar Aug 22 '22 02:08 MathieuSaintes

I guess we could implement that the bootstrap-table convert (normalize and denormalize) the data-fields.

UtechtDustin avatar Aug 22 '22 15:08 UtechtDustin