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 #14815 - improved logic when modelValue is null and selected option value is null #14821

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

rosenthalj
Copy link
Contributor

Fixed #14815

The video listed below shows the issue #14815 reducer working after the fix (Note "All" option corresponds to

{name: 'All',code: null})

drodownFix.mov

Note: I verified the fix did not break any of the PrimeNG demo dropdown examples

The issue was caused by a special case where the modelValue is null but the selected option's value is also null.

As part of the PR, I also renamed the method isOptionEqualsModelValue to isOptionEqualsModelValue which is a more descriptive name. Note: in a previous PR #14768 that was accepted I refactored the code that resulted in the original isOptionEqualsModelValue method

…ion value is null

Added new method isModelValueNotSet to test for special case where modelValue is set because (modelValue is null and the selected option has a value of null )

I also renamed method isOptionEqualsModelValue to isOptionEqualsModelValue which is a more descriptive name.  Note:  in a previous PR that was accepted I refactored the code that resulted  in the original isOptionEqualsModelValue method
Copy link

vercel bot commented Feb 15, 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 23, 2024 1:50pm

@cetincakiroglu cetincakiroglu merged commit b18cb41 into primefaces:master Feb 23, 2024
1 of 3 checks passed
@cetincakiroglu
Copy link
Contributor

Thanks a lot for the effort and support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants