@synerise/ds-select 2.1.4 → 2.1.5
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 +11 -0
- package/dist/components/OptionList.js +5 -7
- package/package.json +9 -9
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
|
+
## [2.1.5](https://github.com/synerise/synerise-design/compare/@synerise/ds-select@2.1.4...@synerise/ds-select@2.1.5) (2026-10-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **utils:** let measured list rows shrink back to their content ([f04903d](https://github.com/synerise/synerise-design/commit/f04903dc40ddbec33850946045c02f914569aeb7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.1.4](https://github.com/synerise/synerise-design/compare/@synerise/ds-select@2.1.3...@synerise/ds-select@2.1.4) (2026-10-09)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @synerise/ds-select
|
|
@@ -3,7 +3,7 @@ import { forwardRef, memo, useRef, useCallback, useMemo, useEffect } from "react
|
|
|
3
3
|
import { VariableSizeList } from "react-window";
|
|
4
4
|
import Loader from "@synerise/ds-loader";
|
|
5
5
|
import Scrollbar from "@synerise/ds-scrollbar";
|
|
6
|
-
import { useMeasuredRow, useMeasuredRowHeights } from "@synerise/ds-utils";
|
|
6
|
+
import { useMeasuredRow, getMeasuredRowStyle, useMeasuredRowHeights } from "@synerise/ds-utils";
|
|
7
7
|
import { VirtualRow, OptionItem, DropdownWrapper, Loading, NotFound, ScrollList, Inner } from "../Select.styles.js";
|
|
8
8
|
import { cx, DEFAULT_LIST_ITEM_HEIGHT, MAX_MEASURED_ROWS, DEFAULT_LIST_HEIGHT, OVERSCAN_COUNT } from "../utils/helpers.js";
|
|
9
9
|
const LIST_STYLE = {
|
|
@@ -24,6 +24,7 @@ const OptionRow = memo(({
|
|
|
24
24
|
optionDomId,
|
|
25
25
|
onOptionActivate,
|
|
26
26
|
onOptionSelect,
|
|
27
|
+
estimateRowHeight,
|
|
27
28
|
measureRow
|
|
28
29
|
} = data;
|
|
29
30
|
const option = options[index];
|
|
@@ -35,11 +36,7 @@ const OptionRow = memo(({
|
|
|
35
36
|
{
|
|
36
37
|
ref: rowRef,
|
|
37
38
|
role: "presentation",
|
|
38
|
-
style:
|
|
39
|
-
...style,
|
|
40
|
-
height: "auto",
|
|
41
|
-
minHeight: style.height
|
|
42
|
-
},
|
|
39
|
+
style: getMeasuredRowStyle(style, estimateRowHeight(index)),
|
|
43
40
|
children: /* @__PURE__ */ jsx(
|
|
44
41
|
OptionItem,
|
|
45
42
|
{
|
|
@@ -151,8 +148,9 @@ const OptionList = ({
|
|
|
151
148
|
optionDomId,
|
|
152
149
|
onOptionActivate,
|
|
153
150
|
onOptionSelect,
|
|
151
|
+
estimateRowHeight,
|
|
154
152
|
measureRow
|
|
155
|
-
}), [options, selectedValues, activeIndex, optionDomId, onOptionActivate, onOptionSelect, measureRow]);
|
|
153
|
+
}), [options, selectedValues, activeIndex, optionDomId, onOptionActivate, onOptionSelect, estimateRowHeight, measureRow]);
|
|
156
154
|
return /* @__PURE__ */ jsx(DropdownWrapper, { onMouseDown: (event) => {
|
|
157
155
|
const target = event.target;
|
|
158
156
|
if (!target.closest('input, textarea, [contenteditable="true"]')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-select",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "Select UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-dropdown": "^2.1.
|
|
46
|
-
"@synerise/ds-form-field": "^2.0.
|
|
47
|
-
"@synerise/ds-icon": "^2.2.
|
|
48
|
-
"@synerise/ds-list-item": "^2.2.
|
|
45
|
+
"@synerise/ds-dropdown": "^2.1.5",
|
|
46
|
+
"@synerise/ds-form-field": "^2.0.8",
|
|
47
|
+
"@synerise/ds-icon": "^2.2.2",
|
|
48
|
+
"@synerise/ds-list-item": "^2.2.1",
|
|
49
49
|
"@synerise/ds-loader": "^2.0.2",
|
|
50
|
-
"@synerise/ds-scrollbar": "^2.0.
|
|
51
|
-
"@synerise/ds-tooltip": "^2.0.
|
|
52
|
-
"@synerise/ds-utils": "^2.2.
|
|
50
|
+
"@synerise/ds-scrollbar": "^2.0.7",
|
|
51
|
+
"@synerise/ds-tooltip": "^2.0.8",
|
|
52
|
+
"@synerise/ds-utils": "^2.2.1",
|
|
53
53
|
"react-window": "^1.8.11"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"styled-components": "^5.3.3",
|
|
59
59
|
"vitest": "4"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "ac1a96b3cd66d2836b0639b3d9920fc0ebd7f8f3"
|
|
62
62
|
}
|