Closed mauthi closed 3 years ago
Hi @mauthi,
We call that internal-filters
They can be dynamic:
You can add filterable
attribute on most type of fields and will work automagic
Besides that, you can also create custom filters, I'll paste a working sample from a project here, hope is self explanatory.
"filters": [{
"label": "Manufacturers",
"data": "products.manufacturer_id",
"type": "select",
"value": [],
"route": "administration.companies.options",
"multiple": true,
"params": {
"is_manufacturer": true
}
}, {
"label": "Vendor",
"data": "products.vendor_id",
"type": "select",
"value": [],
"route": "administration.companies.options",
"multiple": true,
"params": {
"is_manufacturer": true
}
}, {
"label": "Competitor",
"data": "competitorIds",
"type": "select",
"value": [],
"route": "administration.companies.options",
"multiple": true,
"custom": true,
"params": {
"is_competitor": true
}
}],
It should be possible to use both types of filters w/o problems, if used correctly.
Regarding docs, we're waiting for somebody like you to help us integrate this into the docs :)
Thx for your answer - I will try this soon.
It should be possible to use both types of filters w/o problems, if used correctly.
I think I formulated my question wrong. Question is if it's possible to use a filter like BooleanFilter
to trigger internal-filter
logic. I mean I have a BooleanFilter
"Paid" and if it's true I would like to show all invoices with open_amount = 0, if it's false I would like to show all with open amount != 0. I can easily achieve this with internal-filter
but I would like to have the possibility with BooleanFilter
component as well.
Regarding docs, we're waiting for somebody like you to help us integrate this into the docs :)
I would love to help, but you can see from my irregular activity here how much time I have :(
Any kind of external filter that triggers internal filters logic is not supported, or the scope of either of the filters.
A boolean filters that is external and works, sure, we have tens of that.
A boolean filters that is external and works, sure, we have tens of that.
I know, I use many of them in my project. But for the use case described above it's not possible to use the boolean filter. There it would make sense for me to define/overwrite the filter logic in backend like you do it with internal filters.
Do you know what I mean? My goal would be to use filter logic of internal-filters
in backend and trigger them via an own component (e.g. something like the boolean filter component) from frontend.
The feature of internal-filters
is nice, but I can't store predefined scenarios persistent (they are gone after you clear local storage)
Maybe you should start clean here and document better this issue.
ok, will do. Sorry.
I close this for now - will create a new ticket if necessary.
This is a question.
Prerequisites
Description
I found the possibility to create custom filters (like you used id in people table). For this feature I have some questions:
Thx in advance for your help.