@cloud-ru/ds-fields 2.5.1 → 2.5.3-preview-882bc8d5.0
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 +6 -0
- package/dist/cjs/components/FieldSelect/FieldSelect.js +1 -1
- package/dist/esm/components/FieldSelect/FieldSelect.js +2 -2
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +20 -20
- package/src/components/FieldSelect/FieldSelect.tsx +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
## 2.5.2 (2026-10-06)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **FF-9095:** fieldSelect text selection ([083a3b9](https://github.com/cloud-ru-tech/snack-v2/commit/083a3b9e97c87430a0ab1f41365f1060a097cdb0))
|
|
11
|
+
|
|
6
12
|
## 2.5.1 (2026-10-05)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -130,7 +130,7 @@ exports.FieldSelect = (0, react_1.forwardRef)(function FieldSelect(props, ref) {
|
|
|
130
130
|
currentSearch?.onChange?.(next);
|
|
131
131
|
}, []);
|
|
132
132
|
const syncedLabelRef = (0, react_1.useRef)(selectedLabel);
|
|
133
|
-
(0,
|
|
133
|
+
(0, utils_1.useLayoutEffect)(() => {
|
|
134
134
|
if (typing || !resetSearchOnOptionSelection || syncedLabelRef.current === selectedLabel) {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
@@ -6,7 +6,7 @@ import { Tag } from '@cloud-ru/ds-tag';
|
|
|
6
6
|
import { useLayoutEffect } from '@cloud-ru/ds-utils';
|
|
7
7
|
import cn from 'classnames';
|
|
8
8
|
import mergeRefs from 'merge-refs';
|
|
9
|
-
import { forwardRef, useCallback,
|
|
9
|
+
import { forwardRef, useCallback, useMemo, useRef, useState, } from 'react';
|
|
10
10
|
// Минимальная ширина поискового input'а в режиме чипов (паритет с легаси BASE_MIN_WIDTH).
|
|
11
11
|
const SEARCH_INPUT_PLUG_MIN_WIDTH = 4;
|
|
12
12
|
import { FieldDecorator, SIZE, VALIDATION_STATE } from '@cloud-ru/ds-field-decorator';
|
|
@@ -124,7 +124,7 @@ export const FieldSelect = forwardRef(function FieldSelect(props, ref) {
|
|
|
124
124
|
currentSearch?.onChange?.(next);
|
|
125
125
|
}, []);
|
|
126
126
|
const syncedLabelRef = useRef(selectedLabel);
|
|
127
|
-
|
|
127
|
+
useLayoutEffect(() => {
|
|
128
128
|
if (typing || !resetSearchOnOptionSelection || syncedLabelRef.current === selectedLabel) {
|
|
129
129
|
return;
|
|
130
130
|
}
|