@cloud-ru/ds-list 2.3.1 → 2.3.2

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,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.3.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.3.1 (2026-10-05)
7
13
 
8
14
  ### Bug Fixes
@@ -115,7 +115,11 @@ function DesktopDroplist({ items: itemsProp, search, pinBottom: pinBottomProp =
115
115
  const closeDroplist = (0, react_1.useCallback)(() => {
116
116
  setOpen(false);
117
117
  resetActiveItemId();
118
- (triggerElemRefProp ?? triggerElemRef).current?.focus();
118
+ if ((0, utils_1.isBrowser)()) {
119
+ requestAnimationFrame(() => {
120
+ (triggerElemRefProp ?? triggerElemRef).current?.focus();
121
+ });
122
+ }
119
123
  }, [setOpen, resetActiveItemId, triggerElemRefProp]);
120
124
  const openListContextValue = (0, react_1.useMemo)(() => ({ closeDroplistOnItemClick, closeDroplist }), [closeDroplistOnItemClick, closeDroplist]);
121
125
  // virtualized-список не имеет собственной ширины: строки `position:absolute; width:100%`,
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Dropdown } from '@cloud-ru/ds-dropdown';
3
- import { focusWithoutScroll, preventScrollOnVerticalArrows, useValueControl } from '@cloud-ru/ds-utils';
3
+ import { focusWithoutScroll, isBrowser, preventScrollOnVerticalArrows, useValueControl } from '@cloud-ru/ds-utils';
4
4
  import cn from 'classnames';
5
5
  import mergeRefs from 'merge-refs';
6
6
  import { cloneElement, isValidElement, useCallback, useEffect, useMemo, useRef } from 'react';
@@ -109,7 +109,11 @@ export function DesktopDroplist({ items: itemsProp, search, pinBottom: pinBottom
109
109
  const closeDroplist = useCallback(() => {
110
110
  setOpen(false);
111
111
  resetActiveItemId();
112
- (triggerElemRefProp ?? triggerElemRef).current?.focus();
112
+ if (isBrowser()) {
113
+ requestAnimationFrame(() => {
114
+ (triggerElemRefProp ?? triggerElemRef).current?.focus();
115
+ });
116
+ }
113
117
  }, [setOpen, resetActiveItemId, triggerElemRefProp]);
114
118
  const openListContextValue = useMemo(() => ({ closeDroplistOnItemClick, closeDroplist }), [closeDroplistOnItemClick, closeDroplist]);
115
119
  // virtualized-список не имеет собственной ширины: строки `position:absolute; width:100%`,