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

SQFormAutoComplete disabled state allows you to clear and select other values from the dropdown #135

Closed
Chris-Boyle opened this issue Mar 16, 2021 · 1 comment · Fixed by #136
Assignees
Labels
bug Something isn't working released

Comments

@Chris-Boyle
Copy link
Contributor

Chris-Boyle commented Mar 16, 2021

When a user passes the isDisabled prop to the SQFormAutoComplete component the component styles change to a disabled state and we can not click into the text field to type in a value. This is correct. The issue is that a user can just use the dropdown option or clear the value all together using the x option. These two things should not happen if the field is disabled.

Loom: https://www.loom.com/share/3d0cbc59d5b64af2b5e3463fe3e7348a
image

Code to reproduce in storybook
Update this component to be disabled.
https://github.com/SelectQuoteLabs/SQForm/blob/master/stories/SQForm.stories.js#L587

        <SQFormAutocomplete
          name="actions"
          label="Actions with a default value"
          size={5}
          isRequired={true}
          isDisabled
        >
          {ACTIONS_AUTOCOMPLETE_OPTIONS}
        </SQFormAutocomplete>
@Chris-Boyle Chris-Boyle added the bug Something isn't working label Mar 16, 2021
@Chris-Boyle Chris-Boyle self-assigned this Mar 16, 2021
SeanGroff pushed a commit that referenced this issue Mar 16, 2021
### [4.1.4](v4.1.3...v4.1.4) (2021-03-16)

### Bug Fixes

* 🐛 made autocomplete component fully disabled when disabled ([3ab3cca](3ab3cca)), closes [#135](#135)
@SeanGroff
Copy link
Contributor

🎉 This issue has been resolved in version 4.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants