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

fix(MultiSelect): Check for NaN values in isSelectionAllDisabled method #16041

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

dfernandez-elastic
Copy link
Contributor

@dfernandez-elastic dfernandez-elastic commented Jul 17, 2024

Fixes #16039

Added a check for NaN values.

Note:

I couldn't add new tests because my unit tests were not working locally.

When running npm test, I've got a lot of errors with this message: export 'async' (imported as 'async') was not found in '@angular/core/testing'

Copy link

vercel bot commented Jul 17, 2024

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Jul 18, 2024 0:55am

@rosenthalj
Copy link
Contributor

Another way to fix this issue would be to add the following to multiselect.'s ngOnInit method:

        if(isNaN(this.selectionLimit)) {
            this.selectionLimit = undefined
        }

Note: ObjectUtils.isNotEmpty(this.selectionLimit) is call in multiple places throughout multiselect.ts:

@dfernandez-elastic
Copy link
Contributor Author

Hi @rosenthalj I wanted to fix only the Toggle All behavior. I can implement it in the ngOnInit method too. Let's wait for a maintainer response.

Thanks for your suggestion!

Copy link
Contributor

@cetincakiroglu cetincakiroglu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please try the mentioned solution?

src/app/components/multiselect/multiselect.ts Outdated Show resolved Hide resolved
@cetincakiroglu cetincakiroglu added the Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. label Jul 18, 2024
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.

MultiSelect - showToggleAll not working as expected
3 participants