@snack-uikit/fields 0.57.3 → 0.57.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 0.57.4 (2026-08-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **LK-8204:** fix FieldSelect dropdown toggle on option deletion ([3551e5c](https://github.com/cloud-ru-tech/snack-uikit/commit/3551e5c23784215fe8927b7ec9ff40b3cbd999de))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 0.57.3 (2026-08-07)
7
18
 
8
19
  ### Only dependencies have been changed
package/README.md CHANGED
@@ -732,8 +732,8 @@ FieldStepper в основном предназначен для работы с
732
732
  | selectedOptionFormatter | `SelectedOptionFormatter` | - | |
733
733
  | scrollToSelectedItem | `boolean` | - | Флаг, отвещающий за прокручивание до выбранного элемента |
734
734
  | virtualized | `boolean` | - | Включить виртуализацию на компоненты списка. Рекомендуется если у вас от 1к элементов списка |
735
- | scrollRef | `Ref<HTMLElement>` | - | Ссылка на элемент, обозначающий самый конец прокручиваемого списка |
736
- | scrollContainerRef | `Ref<HTMLElement>` | - | Ссылка на контейнер, который скроллится |
735
+ | scrollRef | `RefObject<HTMLElement>` | - | Ссылка на элемент, обозначающий самый конец прокручиваемого списка |
736
+ | scrollContainerRef | `RefObject<HTMLElement>` | - | Ссылка на контейнер, который скроллится |
737
737
  | untouchableScrollbars | `boolean` | - | Отключает возможность взаимодействовать со скролбарами мышью. |
738
738
  | onScroll | `(event?: Event) => void` | - | Колбек на скролл прокручиваемого списка |
739
739
  | dataFiltered | `boolean` | - | |
@@ -930,6 +930,7 @@ FieldStepper в основном предназначен для работы с
930
930
  ### Props
931
931
  | name | type | default value | description |
932
932
  |------|------|---------------|-------------|
933
+ | footerMode* | `unknown` | - | |
933
934
  | open | `boolean` | - | Открыт time-picker |
934
935
  | onOpenChange | `(value: boolean) => void` | - | Колбек открытия пикера |
935
936
  | value | `TimeValue` | - | Значение поля |
@@ -938,7 +939,6 @@ FieldStepper в основном предназначен для работы с
938
939
  | onCopyButtonClick | `() => void` | - | Колбек клика по кнопке Копировать для поля |
939
940
  | showSeconds | `boolean` | true | Показывать ли секунды |
940
941
  | showClearButton | `boolean` | true | Отображение кнопки Очистки поля |
941
- | footerMode | enum TimePickerFooterMode: `"current-time-and-apply"`, `"apply-only"` | current-time-and-apply | Режим футера: кнопка выбора текущего времени («Текущее») и подтверждения выбранного («Применить»), либо только подтверждение («Применить»). |
942
942
  | id | `string` | - | Значение html-атрибута id |
943
943
  | name | `string` | - | Значение html-атрибута name |
944
944
  | disabled | `boolean` | - | Является ли поле деактивированным |
@@ -963,8 +963,8 @@ FieldStepper в основном предназначен для работы с
963
963
  ### Props
964
964
  | name | type | default value | description |
965
965
  |------|------|---------------|-------------|
966
- | __@metadata@2033* | `DecoratorMetadataObject` | - | |
967
- | __@hasInstance@2031* | `(value: any) => boolean` | - | Determines whether the given value inherits from this function if this function was used as a constructor function. A constructor function can control which objects are recognized as its instances by 'instanceof' by overriding this method. |
966
+ | __@metadata@1004* | `DecoratorMetadataObject` | - | |
967
+ | __@hasInstance@1002* | `(value: any) => boolean` | - | Determines whether the given value inherits from this function if this function was used as a constructor function. A constructor function can control which objects are recognized as its instances by 'instanceof' by overriding this method. |
968
968
  | name* | `string` | - | Returns the name of the function. Function names are read-only and can not be changed. |
969
969
  | caller* | `Function` | - | |
970
970
  | arguments* | `any` | - | |
@@ -184,8 +184,9 @@ exports.FieldSelectMultiple = (0, react_1.forwardRef)((props, ref) => {
184
184
  setOpen
185
185
  });
186
186
  const handleItemDelete = (0, hooks_2.useHandleDeleteItem)(setValue);
187
- const handleTagDelete = (0, react_1.useCallback)(option => () => {
187
+ const handleTagDelete = (0, react_1.useCallback)(option => e => {
188
188
  var _a;
189
+ e.stopPropagation();
189
190
  const deleteItemHandler = handleItemDelete(option);
190
191
  deleteItemHandler();
191
192
  (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.focus();
@@ -81,8 +81,9 @@ export const FieldSelectMultiple = forwardRef((props, ref) => {
81
81
  setOpen,
82
82
  });
83
83
  const handleItemDelete = useHandleDeleteItem(setValue);
84
- const handleTagDelete = useCallback((option) => () => {
84
+ const handleTagDelete = useCallback((option) => (e) => {
85
85
  var _a;
86
+ e.stopPropagation();
86
87
  const deleteItemHandler = handleItemDelete(option);
87
88
  deleteItemHandler();
88
89
  (_a = localRef.current) === null || _a === void 0 ? void 0 : _a.focus();
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Fields",
7
- "version": "0.57.3",
7
+ "version": "0.57.4",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -66,5 +66,5 @@
66
66
  "peerDependencies": {
67
67
  "@snack-uikit/locale": "*"
68
68
  },
69
- "gitHead": "9e6abdd71a846caf1f1252b9504560a3b796942f"
69
+ "gitHead": "149b85a36fd85bac31e062815ee5ed6897e43921"
70
70
  }
@@ -5,6 +5,7 @@ import {
5
5
  forwardRef,
6
6
  KeyboardEvent,
7
7
  KeyboardEventHandler,
8
+ MouseEvent,
8
9
  useCallback,
9
10
  useEffect,
10
11
  useRef,
@@ -148,7 +149,8 @@ export const FieldSelectMultiple = forwardRef<HTMLInputElement, FieldSelectMulti
148
149
 
149
150
  const handleItemDelete = useHandleDeleteItem(setValue);
150
151
  const handleTagDelete = useCallback(
151
- (option: BaseItemProps) => () => {
152
+ (option: BaseItemProps) => (e: MouseEvent<HTMLButtonElement>) => {
153
+ e.stopPropagation();
152
154
  const deleteItemHandler = handleItemDelete(option);
153
155
  deleteItemHandler();
154
156
  localRef.current?.focus();