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

refactor: remove onChangedNullable, update onChanged for null val… #177

Merged
merged 4 commits into from
Oct 27, 2024

Conversation

moshOntong-IT
Copy link
Contributor

@moshOntong-IT moshOntong-IT commented Oct 26, 2024

…ues, and set allowDeselection default to false

This commit introduces breaking changes:

  1. Removed the onChangedNullable method to simplify the API and avoid developer confusion. The onChanged method now supports returning or callback with a null value. Developers must implement null checks in their code to handle nullable results from onChanged.

  2. The allowDeselection property now defaults to false. Ensure your code explicitly sets this to true if deselection is needed. However, when the variant is multiple, the allowDeselection property defaults to true.

Please update your code to accommodate these changes.

…ues, and set `allowDeselection` default to false

This commit introduces breaking changes:

1. Removed the `onChangedNullable` method to simplify the API and avoid developer confusion. The `onChanged` method now supports returning or callback with a null value. Developers must implement null checks in their code to handle nullable results from `onChanged`.

2. The `allowDeselection` property now defaults to `false`. Ensure your code explicitly sets this to `true` if deselection is needed.

Please update your code to accommodate these changes.
@moshOntong-IT
Copy link
Contributor Author

I set the allowDeselection into true as a default when the variant type of Select is multiple

Copy link
Owner

@nank1ro nank1ro left a comment

Choose a reason for hiding this comment

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

LGTM

@nank1ro nank1ro merged commit 82f7b41 into nank1ro:main Oct 27, 2024
@moshOntong-IT moshOntong-IT deleted the select_onchanged_problem branch October 27, 2024 09:27
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.

2 participants