ywana-core8 0.1.82 → 0.1.83
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/dist/index.cjs +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +12 -12
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +12 -12
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/list.js +12 -12
package/dist/index.modern.js
CHANGED
@@ -4433,8 +4433,8 @@ var List = function List(props) {
|
|
4433
4433
|
if (onSort) onSort(newConfig);
|
4434
4434
|
}, [sortable, sortConfig, onSort]);
|
4435
4435
|
|
4436
|
-
// Search component
|
4437
|
-
var
|
4436
|
+
// Search component JSX - memoized to prevent focus loss
|
4437
|
+
var searchComponent = useMemo(function () {
|
4438
4438
|
return searchable && /*#__PURE__*/React.createElement("div", {
|
4439
4439
|
className: "list__search"
|
4440
4440
|
}, /*#__PURE__*/React.createElement(TextField, {
|
@@ -4446,7 +4446,7 @@ var List = function List(props) {
|
|
4446
4446
|
outlined: true,
|
4447
4447
|
size: "small"
|
4448
4448
|
}));
|
4449
|
-
};
|
4449
|
+
}, [searchable, searchPlaceholder, searchTerm, handleSearch]);
|
4450
4450
|
|
4451
4451
|
// Generate CSS classes
|
4452
4452
|
var cssClasses = ['list', dense && 'list--dense', outlined && 'list--outlined', disabled && 'list--disabled', animated && 'list--animated', loading && 'list--loading', className].filter(Boolean).join(' ');
|
@@ -4476,12 +4476,12 @@ var List = function List(props) {
|
|
4476
4476
|
return /*#__PURE__*/React.createElement("div", _extends({
|
4477
4477
|
className: cssClasses,
|
4478
4478
|
style: style
|
4479
|
-
}, ariaAttributes, restProps), searchPosition === 'top' &&
|
4479
|
+
}, ariaAttributes, restProps), searchPosition === 'top' && searchComponent, /*#__PURE__*/React.createElement("div", {
|
4480
4480
|
className: "list__empty"
|
4481
4481
|
}, /*#__PURE__*/React.createElement(Icon, {
|
4482
4482
|
icon: emptyIcon,
|
4483
4483
|
size: "large"
|
4484
|
-
}), /*#__PURE__*/React.createElement(Text, null, emptyMessage)), searchPosition === 'bottom' &&
|
4484
|
+
}), /*#__PURE__*/React.createElement(Text, null, emptyMessage)), searchPosition === 'bottom' && searchComponent, children);
|
4485
4485
|
}
|
4486
4486
|
|
4487
4487
|
// Render grouped or normal list
|
@@ -4498,7 +4498,7 @@ var List = function List(props) {
|
|
4498
4498
|
className: cssClasses,
|
4499
4499
|
style: style,
|
4500
4500
|
ref: listRef
|
4501
|
-
}, ariaAttributes, restProps), searchPosition === 'top' &&
|
4501
|
+
}, ariaAttributes, restProps), searchPosition === 'top' && searchComponent, sortable && sortBy && /*#__PURE__*/React.createElement("div", {
|
4502
4502
|
className: "list__sort"
|
4503
4503
|
}, /*#__PURE__*/React.createElement("button", {
|
4504
4504
|
className: "list__sort-button",
|
@@ -4527,7 +4527,7 @@ var List = function List(props) {
|
|
4527
4527
|
disabled: disabled,
|
4528
4528
|
animated: animated
|
4529
4529
|
});
|
4530
|
-
})), searchPosition === 'bottom' &&
|
4530
|
+
})), searchPosition === 'bottom' && searchComponent, children);
|
4531
4531
|
};
|
4532
4532
|
|
4533
4533
|
/**
|
@@ -4596,8 +4596,8 @@ var GroupedList = function GroupedList(props) {
|
|
4596
4596
|
});
|
4597
4597
|
}, []);
|
4598
4598
|
|
4599
|
-
// Search component for grouped list
|
4600
|
-
var
|
4599
|
+
// Search component for grouped list - memoized to prevent focus loss
|
4600
|
+
var groupedSearchComponent = useMemo(function () {
|
4601
4601
|
return searchable && /*#__PURE__*/React.createElement("div", {
|
4602
4602
|
className: "list__search"
|
4603
4603
|
}, /*#__PURE__*/React.createElement(TextField, {
|
@@ -4609,11 +4609,11 @@ var GroupedList = function GroupedList(props) {
|
|
4609
4609
|
outlined: true,
|
4610
4610
|
size: "small"
|
4611
4611
|
}));
|
4612
|
-
};
|
4612
|
+
}, [searchable, searchPlaceholder, searchTerm, onSearch]);
|
4613
4613
|
return /*#__PURE__*/React.createElement("div", _extends({
|
4614
4614
|
className: cssClasses + " grouped",
|
4615
4615
|
style: style
|
4616
|
-
}, ariaAttributes, restProps), searchPosition === 'top' &&
|
4616
|
+
}, ariaAttributes, restProps), searchPosition === 'top' && groupedSearchComponent, groups.map(function (group) {
|
4617
4617
|
var isCollapsed = collapsedGroups.has(group.name);
|
4618
4618
|
var groupTitle = groupRenderer ? groupRenderer(group) : /*#__PURE__*/React.createElement(Text, null, group.name);
|
4619
4619
|
return /*#__PURE__*/React.createElement(Fragment$2, {
|
@@ -4656,7 +4656,7 @@ var GroupedList = function GroupedList(props) {
|
|
4656
4656
|
animated: animated
|
4657
4657
|
});
|
4658
4658
|
})));
|
4659
|
-
}), searchPosition === 'bottom' &&
|
4659
|
+
}), searchPosition === 'bottom' && groupedSearchComponent, children);
|
4660
4660
|
};
|
4661
4661
|
|
4662
4662
|
/**
|