
That was nice when tabulator guarantee the format of values passed into searchFunc.
Relaying on that guarantee I can reuse one searchFunc everywhere.
Now I should copy/paste tabulators parseItems into my code...
Why this is done?
possible related:

and this also related.
Actually listItemFormatter is not required at all if searchFunc already returns correctly formatted match list.
Also, please, do not break old code which returns already formatted items
Hey @KES777
This isn't a regression, this is intended functionality. It was needed to enable the use of async ajax callbacks, because these would retrieve data not passed into the values list for the function, therefore the list would have to be built in the function
Passing in the arbitrary search object was clunky. for most uses receiving the list of values originally passed into the params was more intuitive. It also passed in parts of object that were used internally by the editor which was not really good practice.
The 4.6 Upgrade Guide does also point out that changes are needed to the searchFunc when implementing this update.
Functionality changes in each update, im afraid that from time to times things will need to change, but when they do the upgrade guide will detail the changes.
I am sorry that this had adversely affected your codebase, but im afraid the changes are needed and are here to stay.
Cheers
Oli :)
It was needed to enable the use of async ajax callbacks
I do not argue that is required thing,
but this is not documented how to use that. Probably link to an example or so
I should add that if you want to continue the old functionality, that is not a problem at all, simply create a custom editor using the old code :)
The Upgrade guide explains that it is the values property passed directly into the searchFunc there is no need to explain what the item argument is in the forEach is as it is arbitrary, depending on the type of the values argument, in the case of the example it is an array
but matches requires particular format, right? This is not clear from doc
This too implicit how matches relates to listItemFormatter.
And another question is not clear from doc: does item from matches just goes to listItemFormatter as value or as title
Hey @KES777
It no longer has any format, all you have to do is return a valid set of values, that matches the list of allowed types for the values property.
All it does now is takes the values from the values property and filters them and passes them out again.
Cheers
Oli :)