primeng
primeng copied to clipboard
fix(dropdown): Fix filter when options is array of strings
Fixes #10122
Defect Fixes
#10122
Basically, if the first option is of type string, we can assume that options is an array of strings. As filter function of the FilterService is general and already accepts a function for the searchFields parameter, we can provide simple identity function, that for string X returns it's identity, an X. This will make filtering work on simple string options work.
This PR fixes the problem without introducing any breaking change.