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

Update list_field.dart to only updateField on valid values #1

Closed
wants to merge 1 commit into from

Conversation

bramp
Copy link
Owner

@bramp bramp commented Mar 1, 2024

The DropdownMenu has search enabled, which allows users to type any input. If the user types something that doesn't match an existing item, value is null, leading to a null pointer issue.

Instead just don't update the field when null is provided.

List of issues which are fixed by the PR

Fixes widgetbook#1151

Checklist

  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making].
  • All existing and new tests are passing.

If you need help, consider asking for advice on Discord.

The DropdownMenu has search enabled, which allows users to type any input. If the user types something that doesn't match an existing item, `value` is null, leading to a null pointer issue.

Instead just don't update the field when null is provided.
@bramp bramp closed this Mar 1, 2024
@bramp bramp deleted the bramp-patch-1 branch March 1, 2024 16:58
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.

Dropdown Knobs crash the storybook if an invalid value is typed.
1 participant