@cloud-ru/uikit-product-mobile-dropdown 2.1.12 → 2.1.13
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/cjs/components/MobileDroplist.d.ts +1 -2
- package/dist/cjs/components/MobileDroplist.js +2 -2
- package/dist/esm/components/MobileDroplist.d.ts +1 -2
- package/dist/esm/components/MobileDroplist.js +2 -2
- package/package.json +2 -2
- package/src/components/MobileDroplist.tsx +3 -3
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.13 (2026-04-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **PDS-3778:** fixed missing scroll without virtualized in mobile droplist ([fa9abb5](https://github.com/cloud-ru-tech/uikit-product/commit/fa9abb5b04bc609b3f6f06112baf16b266b7dfbd))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 2.1.12 (2026-04-27)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
|
@@ -2,6 +2,5 @@ import { DroplistProps, ListProps } from '@snack-uikit/list';
|
|
|
2
2
|
import { MobileDropdownProps } from './MobileDropdown';
|
|
3
3
|
export type MobileDroplistProps = Omit<MobileDropdownProps, 'content'> & Pick<DroplistProps, 'closeDroplistOnItemClick'> & ListProps & {
|
|
4
4
|
label?: string;
|
|
5
|
-
virtualized?: boolean;
|
|
6
5
|
};
|
|
7
|
-
export declare function MobileDroplist({ items, selection, open: openProp, onOpenChange, children, search, label, footer, virtualized, closeDroplistOnItemClick, ...rest }: MobileDroplistProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function MobileDroplist({ items, selection, open: openProp, onOpenChange, children, search, label, footer, virtualized, closeDroplistOnItemClick, scroll, ...rest }: MobileDroplistProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,7 +22,7 @@ const list_1 = require("@snack-uikit/list");
|
|
|
22
22
|
const utils_1 = require("@snack-uikit/utils");
|
|
23
23
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
24
24
|
function MobileDroplist(_a) {
|
|
25
|
-
var { items, selection, open: openProp, onOpenChange, children, search, label, footer, virtualized, closeDroplistOnItemClick } = _a, rest = __rest(_a, ["items", "selection", "open", "onOpenChange", "children", "search", "label", "footer", "virtualized", "closeDroplistOnItemClick"]);
|
|
25
|
+
var { items, selection, open: openProp, onOpenChange, children, search, label, footer, virtualized, closeDroplistOnItemClick, scroll } = _a, rest = __rest(_a, ["items", "selection", "open", "onOpenChange", "children", "search", "label", "footer", "virtualized", "closeDroplistOnItemClick", "scroll"]);
|
|
26
26
|
const scrollRef = (0, react_1.useRef)(null);
|
|
27
27
|
const [open = false, setIsOpen] = (0, utils_1.useValueControl)({ value: openProp, onChange: onOpenChange });
|
|
28
28
|
const searchable = search;
|
|
@@ -35,7 +35,7 @@ function MobileDroplist(_a) {
|
|
|
35
35
|
}
|
|
36
36
|
(_a = selection === null || selection === void 0 ? void 0 : selection.onChange) === null || _a === void 0 ? void 0 : _a.call(selection, selectedItem);
|
|
37
37
|
};
|
|
38
|
-
const listJsx = ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.listWrapper, "data-virtualized": virtualized || undefined, children: (0, jsx_runtime_1.jsx)(list_1.List, Object.assign({ items: items, selection: selection && Object.assign(Object.assign({}, selection), { onChange: handleSelectItem }), size: 'l', search: searchable ? search : undefined, scrollRef: searchable || virtualized ? scrollRef : undefined, scroll: virtualized, virtualized: virtualized }, rest)) }));
|
|
38
|
+
const listJsx = ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.listWrapper, "data-virtualized": virtualized || undefined, children: (0, jsx_runtime_1.jsx)(list_1.List, Object.assign({ items: items, selection: selection && Object.assign(Object.assign({}, selection), { onChange: handleSelectItem }), size: 'l', search: searchable ? search : undefined, scrollRef: searchable || virtualized || scroll ? scrollRef : undefined, scroll: virtualized || scroll || undefined, virtualized: virtualized }, rest)) }));
|
|
39
39
|
const trigger = (0, react_1.useMemo)(() => {
|
|
40
40
|
const handleOpen = () => setIsOpen(true);
|
|
41
41
|
if ((0, react_1.isValidElement)(children)) {
|
|
@@ -2,6 +2,5 @@ import { DroplistProps, ListProps } from '@snack-uikit/list';
|
|
|
2
2
|
import { MobileDropdownProps } from './MobileDropdown';
|
|
3
3
|
export type MobileDroplistProps = Omit<MobileDropdownProps, 'content'> & Pick<DroplistProps, 'closeDroplistOnItemClick'> & ListProps & {
|
|
4
4
|
label?: string;
|
|
5
|
-
virtualized?: boolean;
|
|
6
5
|
};
|
|
7
|
-
export declare function MobileDroplist({ items, selection, open: openProp, onOpenChange, children, search, label, footer, virtualized, closeDroplistOnItemClick, ...rest }: MobileDroplistProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function MobileDroplist({ items, selection, open: openProp, onOpenChange, children, search, label, footer, virtualized, closeDroplistOnItemClick, scroll, ...rest }: MobileDroplistProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,7 +16,7 @@ import { List } from '@snack-uikit/list';
|
|
|
16
16
|
import { useValueControl } from '@snack-uikit/utils';
|
|
17
17
|
import styles from './styles.module.css';
|
|
18
18
|
export function MobileDroplist(_a) {
|
|
19
|
-
var { items, selection, open: openProp, onOpenChange, children, search, label, footer, virtualized, closeDroplistOnItemClick } = _a, rest = __rest(_a, ["items", "selection", "open", "onOpenChange", "children", "search", "label", "footer", "virtualized", "closeDroplistOnItemClick"]);
|
|
19
|
+
var { items, selection, open: openProp, onOpenChange, children, search, label, footer, virtualized, closeDroplistOnItemClick, scroll } = _a, rest = __rest(_a, ["items", "selection", "open", "onOpenChange", "children", "search", "label", "footer", "virtualized", "closeDroplistOnItemClick", "scroll"]);
|
|
20
20
|
const scrollRef = useRef(null);
|
|
21
21
|
const [open = false, setIsOpen] = useValueControl({ value: openProp, onChange: onOpenChange });
|
|
22
22
|
const searchable = search;
|
|
@@ -29,7 +29,7 @@ export function MobileDroplist(_a) {
|
|
|
29
29
|
}
|
|
30
30
|
(_a = selection === null || selection === void 0 ? void 0 : selection.onChange) === null || _a === void 0 ? void 0 : _a.call(selection, selectedItem);
|
|
31
31
|
};
|
|
32
|
-
const listJsx = (_jsx("div", { className: styles.listWrapper, "data-virtualized": virtualized || undefined, children: _jsx(List, Object.assign({ items: items, selection: selection && Object.assign(Object.assign({}, selection), { onChange: handleSelectItem }), size: 'l', search: searchable ? search : undefined, scrollRef: searchable || virtualized ? scrollRef : undefined, scroll: virtualized, virtualized: virtualized }, rest)) }));
|
|
32
|
+
const listJsx = (_jsx("div", { className: styles.listWrapper, "data-virtualized": virtualized || undefined, children: _jsx(List, Object.assign({ items: items, selection: selection && Object.assign(Object.assign({}, selection), { onChange: handleSelectItem }), size: 'l', search: searchable ? search : undefined, scrollRef: searchable || virtualized || scroll ? scrollRef : undefined, scroll: virtualized || scroll || undefined, virtualized: virtualized }, rest)) }));
|
|
33
33
|
const trigger = useMemo(() => {
|
|
34
34
|
const handleOpen = () => setIsOpen(true);
|
|
35
35
|
if (isValidElement(children)) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-mobile-dropdown",
|
|
3
3
|
"title": "Mobile Dropdown",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.13",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@snack-uikit/utils": "3.10.1",
|
|
44
44
|
"uncontrollable": "8.0.4"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "46f40e7ec89f4173d660983a5f0368937d45bf9d"
|
|
47
47
|
}
|
|
@@ -11,7 +11,6 @@ export type MobileDroplistProps = Omit<MobileDropdownProps, 'content'> &
|
|
|
11
11
|
Pick<DroplistProps, 'closeDroplistOnItemClick'> &
|
|
12
12
|
ListProps & {
|
|
13
13
|
label?: string;
|
|
14
|
-
virtualized?: boolean;
|
|
15
14
|
};
|
|
16
15
|
|
|
17
16
|
export function MobileDroplist({
|
|
@@ -25,6 +24,7 @@ export function MobileDroplist({
|
|
|
25
24
|
footer,
|
|
26
25
|
virtualized,
|
|
27
26
|
closeDroplistOnItemClick,
|
|
27
|
+
scroll,
|
|
28
28
|
...rest
|
|
29
29
|
}: MobileDroplistProps) {
|
|
30
30
|
const scrollRef = useRef<HTMLDivElement>(null);
|
|
@@ -51,8 +51,8 @@ export function MobileDroplist({
|
|
|
51
51
|
selection={selection && { ...selection, onChange: handleSelectItem }}
|
|
52
52
|
size='l'
|
|
53
53
|
search={searchable ? search : undefined}
|
|
54
|
-
scrollRef={searchable || virtualized ? scrollRef : undefined}
|
|
55
|
-
scroll={virtualized}
|
|
54
|
+
scrollRef={searchable || virtualized || scroll ? scrollRef : undefined}
|
|
55
|
+
scroll={virtualized || scroll || undefined}
|
|
56
56
|
virtualized={virtualized}
|
|
57
57
|
{...rest}
|
|
58
58
|
/>
|