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

<b:datatable> searching is wrong when the row contains buttons #911

Closed
vsvetoslavov opened this issue Feb 8, 2018 · 5 comments
Closed
Assignees
Milestone

Comments

@vsvetoslavov
Copy link
Contributor

vsvetoslavov commented Feb 8, 2018

When using a data table we may have controls inside the rows. The search functionality of the data table however searches inside their generated html (expected but not desired) - so if you have a table with some buttons in the last column, if you type "3" (without the quotes) in the search field, you'll most probably get the third row visible, no matter if there are 3-s or not - mainly because of the button ids being like something:3:mybutton -- containing the row number.
I tried using the searchable=false attribute in the dataTableColumn, but, as specified, it only works with multi-column search.
It would be nice if searchable would also work when multi-column-search is false. This behaviour exists in DataTables.net -- columns: [null, null, ... , {searchable: false}, ...]

@stephanrauh
Copy link
Collaborator

OK, it took a while, but I think now I've got it. You want to be able to exclude certain columns from the search while still having a single search field for the entire table?

@vsvetoslavov
Copy link
Contributor Author

@stephanrauh yes. And the reason for the exclusion is because the search also searches in some of the custom HTML code. I added an example to make it more clear:
https://jsfiddle.net/nupkc/wrjzggwj/

@stephanrauh
Copy link
Collaborator

I've implemented the feature. Thank for creating the Fiddle. It helped me a lot!

@stephanrauh stephanrauh self-assigned this Jun 3, 2018
@stephanrauh stephanrauh added this to the v1.5.0 milestone Jun 3, 2018
@stephanrauh
Copy link
Collaborator

There's a new developer snapshot at Maven Central, so you can test the feature. See #369 how to get it.

@vsvetoslavov
Copy link
Contributor Author

I won't be able to test this any time soon. Maybe someone else...

@stephanrauh stephanrauh modified the milestones: v1.5.0, v1.3.0 Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants