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

Added emptyText to SelectArrayInput component #10504

Open
wants to merge 6 commits into
base: next
Choose a base branch
from

Conversation

Tomas025
Copy link

@Tomas025 Tomas025 commented Feb 8, 2025

Problem

Absence of the emptyText property in the SelectArrayInput component #10454

Solution

The empty Text property was added to the component, the emptyText option clears all fields that had been selected

How To Test

It is possible to view the update in the storybook

Additional Checks

  • [ ✓ ] The PR targets master for a bugfix, or next for a feature
  • [ ✓ ] The PR includes unit tests (if not possible, describe why)
  • [ ✓ ] The PR includes one or several stories (if not possible, describe why)
  • [ ✓ ] The documentation is up to date

Also, please make sure to read the contributing guidelines.

Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

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

Thanks!

@fzaninotto
Copy link
Member

I'm -1 for this feature. The right UI for clearing a select input is a clear button, not a clear option.

image

MUI has a discussion and instructions for implementing this in user land:

mui/material-ui#27141

@Tomas025
Copy link
Author

I agree that it makes more sense a clear button, but I tried to replicate the way it was in <SelectInput> and I also realized that it <NullableBooleanInput> is also that way with an empty field in the choices

@fzaninotto
Copy link
Member

I agree that it makes more sense a clear button, but I tried to replicate the way it was in <SelectInput> and I also realized that it <NullableBooleanInput> is also that way with an empty field in the choices

I understand your reasonning, and it makes sense. However, for new features, we look for the best balance between intuitive DX and good UX. In this case, I think the balance clearly points to a clear button as adornment.

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.

5 participants