Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #14682 - Dropdown | TypeError: option.toLowerCase is not a func… #14710

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

mehmetcetin01140
Copy link
Contributor

Fixes #14682

Copy link

vercel bot commented Feb 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Feb 5, 2024 11:06am

Copy link

github-actions bot commented Feb 5, 2024

Thanks a lot for your contribution! But, PR does not seem to fit our code format standards. Please run the 'npm run format' command and commit the changes.

@github-actions github-actions bot added the Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. label Feb 5, 2024
Copy link

github-actions bot commented Feb 5, 2024

Thanks a lot for your contribution! But, PR does not seem to fit our code format standards. Please run the 'npm run format' command and commit the changes.

@cetincakiroglu cetincakiroglu merged commit 93668db into master Feb 7, 2024
2 of 3 checks passed
@cetincakiroglu cetincakiroglu removed the Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. label Feb 7, 2024
@basvandenberg
Copy link

@mehmetcetin01140, @cetincakiroglu I noticed that the code still contains a option.toLowerCase(), even though option has type any, and I would expect most users to provide objects as options, not strings. This PR might prevent the error for one use case, but I would expect it to still occur in other cases. I have seen multiple issues that mention this same error.

I am trying to understand the logic, to see how this can be fixed, but to me it is not clear why there are two filters. Why not always use the filterService.filter? Could you please explain why the more basic filter is used if:

!(this.filterBy || this.optionLabel) && !this.filterFields && !this.optionValue

I have a hard time trying to understand this logic, it would be great if you could provide some insight.

@cetincakiroglu cetincakiroglu deleted the issue-14682 branch February 28, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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