Open mat813 opened 4 years ago
Ok, I knew that writing my problem down would end into me finding how to do it.
I amended my hidden column's definition to:
{
label: 'state'
name: 'product_state'
sort: true
visibility: false
filter:
validator: (rowValue, filterText) ->
rowValue == filterText
}
and it now works as expected. It would be great if it was documented 0:-)
I do have one thing to report, that is more of a cosmetic thing, the hidden column is the only one to have a search filter, and I have a small grey bar that is below the column names. I assume it is where filters would end up.
I think it should only be there if there are filters in visible columns.
Reading the code, I think showFilterRow
needs a bit of patching to only return true for columns that have visibility
to true.
Hi @mat813 ,
Thanks for your suggestions, I will try to include them in the next release.
Cheers, Ruby.
Hi,
I am migrating an app from server-side with datatables to vue.js using vue-bootstrap4-table. I am very happy with it, but for one point, there are some tables where I have buttons search helpers, usually helping filter hidden columns. I stumbled upon customFilters, and I wrote this (slightly edited to remove unimportant bits):
The idea is to have those buttons filter the products by product_state column. At first, the product_state column did not have a filter defined, but this gave an error, so I added one.
My problem is, now, it does not give out an error, but clicking on the buttons does not do anything.
So I am wondering, how do customFilters work exactly? Am I doing it wrong?