react icon indicating copy to clipboard operation
react copied to clipboard

`Autocomplete.Input` does not allow value to be set to empty string `""`

Open Swiftwork opened this issue 3 years ago • 1 comments

Describe the bug If the value is explicitly set to an empty string from the parent on the Autocomplete.Input it won't clear the text in the field.

To Reproduce Line 149 in AutocompleteInput.tsx

Expected behavior It should either allow empty strings or change the operation to be setInputValue(value || '').

Desktop (please complete the following information):

  • OS: All
  • Browser: All
  • Version: 35.1.0

Smartphone (please complete the following information):

  • Device: All
  • OS: All
  • Browser: All
  • Version: 35.1.0

Swiftwork avatar Mar 24 '22 17:03 Swiftwork

PR created: https://github.com/primer/react/pull/2127

Swiftwork avatar Jun 20 '22 19:06 Swiftwork

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.

github-actions[bot] avatar Dec 17 '22 20:12 github-actions[bot]

Closed by: https://github.com/primer/react/pull/2154

Swiftwork avatar Dec 17 '22 23:12 Swiftwork