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, scrollElementId, optionsMenuRef = boxRef,
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
- (0, react_1.useEffect)(() => {
48
- const scrollContainer = scrollElementId
49
- ? document.getElementById(scrollElementId)
50
- : null;
51
- const handleScroll = (e) => {
52
- var _a;
53
- const target = e.target;
54
- // Check if the scroll came from inside the dropdown menu (list box)
55
- const isInternalListboxScroll = target.closest(".p-listbox-list-wrapper");
56
- // Only hide if it's not a scroll from the dropdown list itself
57
- if (!isInternalListboxScroll && ((_a = optionsMenuRef === null || optionsMenuRef === void 0 ? void 0 : optionsMenuRef.current) === null || _a === void 0 ? void 0 : _a.hide)) {
58
- optionsMenuRef.current.hide(e);
59
- }
60
- };
61
- scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.addEventListener("scroll", handleScroll);
62
- window.addEventListener("scroll", handleScroll, true);
63
- return () => {
64
- scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.removeEventListener("scroll", handleScroll);
65
- window.removeEventListener("scroll", handleScroll, true);
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "6.4.42",
3
+ "version": "6.4.43",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",