[Textinput] hasClear не работает, если значение изменятся не через prop value
- Dominant language
- TypeScript
- Stars
- 356
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
Если отслеживать изменения через ref или как это делает react-hook-form, то крестик, при установленном значении prop `hasClear` не будет появляться при наличии текста в поле для ввода. Может добавить принудилтельный модификатор `isVisible`, а не проверять наличии значения в prop `value` [See](https://github.com/bem/yandex-ui/blob/master/src/components/Textinput/_hasClear/Textinput_hasClear.tsx#L78)
Contributor guide
Research direction
Start in src/components/Textinput/_hasClear/Textinput_hasClear.tsx at the referenced line and inspect how hasClear depends on the value prop. Reproduce the case where text changes through a ref or react-hook-form rather than value, then determine the expected visibility behavior for the clear control. Done means the clear control appears when the input contains text in that case and remains consistent with the existing hasClear behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100