sccoreui 6.4.42 → 6.4.43
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.
|
@@ -14,7 +14,9 @@ const ListBoxDropdown = (props) => {
|
|
|
14
14
|
const boxRef = (0, react_1.useRef)();
|
|
15
15
|
const { selectAll,
|
|
16
16
|
// onSelectAll,
|
|
17
|
-
onSelectionChange, onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIconSize, listItems, filter, multiple, filterPlaceholder, optionLabel, listClassName, menuClassName, listBoxParentClassName, listBoxclassName, optionTemplate, values, link, className,
|
|
17
|
+
onSelectionChange, onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIconSize, listItems, filter, multiple, filterPlaceholder, optionLabel, listClassName, menuClassName, listBoxParentClassName, listBoxclassName, optionTemplate, values, link, className,
|
|
18
|
+
// scrollElementId,
|
|
19
|
+
optionsMenuRef = boxRef,
|
|
18
20
|
// buttonClassName,
|
|
19
21
|
showChips, chipTemplate, chipClassName, chipsParentClassName, showRemoveIcon, removeIconSize, removeIconClassName, onRemoveItem, isDraggable, onDranghandle, onShow, onHide, onFocus, confirmationOption, selectedOptionNone, type, emptyFilterMessage, emptyMessage, dataLabel, onFilterValueChange, virtualScrollerOptions, virtualScroll, fetchData, } = props;
|
|
20
22
|
const [selectedItems, setSelectedItems] = (0, react_1.useState)([]);
|
|
@@ -44,27 +46,26 @@ const ListBoxDropdown = (props) => {
|
|
|
44
46
|
// if (elm) elm.addEventListener("scroll", handleScroll);
|
|
45
47
|
// }
|
|
46
48
|
// }, []);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}, [scrollElementId, optionsMenuRef]);
|
|
49
|
+
// useEffect(() => {
|
|
50
|
+
// const scrollContainer = scrollElementId
|
|
51
|
+
// ? document.getElementById(scrollElementId)
|
|
52
|
+
// : null;
|
|
53
|
+
// const handleScroll = (e: any) => {
|
|
54
|
+
// const target = e.target as HTMLElement;
|
|
55
|
+
// // Check if the scroll came from inside the dropdown menu (list box)
|
|
56
|
+
// const isInternalListboxScroll = target.closest(".p-listbox-list-wrapper");
|
|
57
|
+
// // Only hide if it's not a scroll from the dropdown list itself
|
|
58
|
+
// if (!isInternalListboxScroll && optionsMenuRef?.current?.hide) {
|
|
59
|
+
// optionsMenuRef.current.hide(e);
|
|
60
|
+
// }
|
|
61
|
+
// };
|
|
62
|
+
// scrollContainer?.addEventListener("scroll", handleScroll);
|
|
63
|
+
// window.addEventListener("scroll", handleScroll, true);
|
|
64
|
+
// return () => {
|
|
65
|
+
// scrollContainer?.removeEventListener("scroll", handleScroll);
|
|
66
|
+
// window.removeEventListener("scroll", handleScroll, true);
|
|
67
|
+
// };
|
|
68
|
+
// }, [scrollElementId, optionsMenuRef]);
|
|
68
69
|
const handleDragStart = (e, index) => {
|
|
69
70
|
e.dataTransfer.setData("text/plain", index);
|
|
70
71
|
};
|