primeng icon indicating copy to clipboard operation
primeng copied to clipboard

fix(dropdown): Fix filter when options is array of strings

Open lukasmatta opened this issue 4 years ago • 0 comments

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.

lukasmatta avatar Apr 08 '22 13:04 lukasmatta