-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(input-autocomplete): refactoring (#918)
- Loading branch information
Showing
38 changed files
with
632 additions
and
1,292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
'@alfalab/core-components-input-autocomplete': major | ||
--- | ||
|
||
- Мобильный компонент приведен в соответствие с десктопным, теперь оба компонента имеют одинаковый список пропсов, за некоторым исключением. | ||
- Удалены пропы onFilter, filter, onClearFilter и др, которые раньше использовались только в мобильном компоненте | ||
|
||
## Миграция с предыдущей версии | ||
Из мобильного компонента удалено дополнительное состояние для фильтра, | ||
соответственно были удалены пропы onFilter, filter, onClearFilter. | ||
Теперь при открытии шторки в инпут будет попадать состояние, переданное через проп value, как и у десктопного компонента, | ||
а при вводе значения в инпут будет вызываться коллбэк onInput. При нажатии кнопок "Отмена" и "Продолжить" также будет вызываться onInput. | ||
После апдейта нужно заменить | ||
```jsx | ||
<InputAutocompeteMobile onFilter={onFilter} filter={filter} value={value} /> | ||
``` | ||
на | ||
```jsx | ||
<InputAutocompeteMobile onInput={onFilter} value={value} /> | ||
``` | ||
|
||
Примеры можете посмотреть в нашем [сторибуке](https://core-ds.github.io/core-components/master/?path=/docs/inputautocomplete--docs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@alfalab/core-components-select': minor | ||
--- | ||
|
||
- В searchProps добавлена возможность прокинуть кастомную функцию фильтрации | ||
- Фокус в поле поиска устанавливается после вызова transitionProps.onEntered, а не по таймауту как раньше |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.