You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in issue #450 setting a delimiter on one filter overrides every other filter because the value is stored statically on the class.
It used to be that this was overriding includes and sorts but pull request 451 solved that problem: #451
But it didn't solve the bigger problem of these values being stored globally as a static property of the class and not being limited to the single filter instance being created.
I have found out because I noticed that my date time range filters weren't working because the value that the custom filter received was suddenly a string "2021-01-02 23:00:00,2021-02-23 22:59:59" instead of an array ["2021-01-02 23:00:00","2021-02-23 22:59:59"]. So while I solved my problem of being able to search for strings containing the , character it introduced a new problem where every other filter that relies on comma delimited arrays breaks.
// The first call will set the delimiter statically and thus apply to every other filter
AllowedFilter::scope('search', null, '|')->ignore(null, ""),
AllowedFilter::custom('deadline', newFilterDateTimeRange),
I am of the opinion that if you're going to provide a delimiter symbol parameter in a function call for creating a single filter, then that function call should not have any effect on all the other filters.
The text was updated successfully, but these errors were encountered:
As mentioned in issue #450 setting a delimiter on one filter overrides every other filter because the value is stored statically on the class.
It used to be that this was overriding includes and sorts but pull request 451 solved that problem: #451
But it didn't solve the bigger problem of these values being stored globally as a static property of the class and not being limited to the single filter instance being created.
I have found out because I noticed that my date time range filters weren't working because the value that the custom filter received was suddenly a string
"2021-01-02 23:00:00,2021-02-23 22:59:59"
instead of an array["2021-01-02 23:00:00","2021-02-23 22:59:59"]
. So while I solved my problem of being able to search for strings containing the,
character it introduced a new problem where every other filter that relies on comma delimited arrays breaks.I am of the opinion that if you're going to provide a delimiter symbol parameter in a function call for creating a single filter, then that function call should not have any effect on all the other filters.
The text was updated successfully, but these errors were encountered: