saas-js / saas-ui

The React component library for startups, built with Chakra UI.
https://saas-ui.dev
MIT License
1.36k stars 131 forks source link

SearchInput can be interacted with while disabled #224

Closed bhainesva closed 6 months ago

bhainesva commented 7 months ago

Description

When I passed isDisabled={true} to the SearchInput component I expected to be unable to interact with the input, but instead I could still click the "x" button to clear the input's value.

Link to Reproduction

https://codesandbox.io/p/sandbox/search-input-interaction-2pfnd7?file=%2Fsrc%2Findex.tsx%3A5%2C1

Steps to reproduce

  1. Enter some text in the Search Input
  2. Click the button to toggle the input's disabled status
  3. See that you are no longer able to focus or edit text in the input, but you can use the "x" button to clear the input's content.

Saas UI Version

2.8.1

Chakra UI Version

2.8.2

Browser

Firefox 124.0.2 (64-bit)

Operating System

Additional Information

No response

linear[bot] commented 7 months ago

SUI-473 SearchInput can be interacted with while disabled

Pagebakers commented 6 months ago

Thanks for reporting, I'll investigate and release a fix shortly.