primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Component: Dropdown TypeError: option.toLowerCase is not a function

Open CyleClone opened this issue 2 years ago • 2 comments

Describe the bug

Same problem as in issue #14370: Declaring a dropdown with a filter, but not specifying optionlabel="label" or filterBy="label" breaks the dropdown on filter.

Environment

Chrome, Mozilla

Reproducer

https://stackblitz.com/edit/github-3wjoqr?file=src%2Fapp%2Fapp.component.html

Angular version

17.x.x

PrimeNG version

17.x.x

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.x.x

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

Default filter should reference to label as before, not undefined

CyleClone avatar Feb 01 '24 08:02 CyleClone

I have the same problem. Event with 17.4.0.

bartan34 avatar Feb 01 '24 13:02 bartan34

For me, when I have to add both optionLabel="label" and filterBy="label". Then because of that, I also have to add optionValue="value", if not it pastes the object instead of the value.

asithade avatar Feb 01 '24 20:02 asithade