sccoreui 6.3.80 → 6.3.82

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.
@@ -13,13 +13,15 @@ const ListBoxDropdown = (props) => {
13
13
  const boxRef = (0, react_1.useRef)();
14
14
  const { selectAll,
15
15
  // onSelectAll,
16
- onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIconSize, listItems, filter, multiple, filterPlaceholder, optionLabel, listClassName, menuClassName, listBoxParentClassName, listBoxclassName, optionTemplate, values, link, className, scrollElementId, optionsMenuRef = boxRef,
16
+ onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIconSize, listItems, filter, multiple, filterPlaceholder, optionLabel, listClassName, menuClassName, listBoxParentClassName, listBoxclassName, optionTemplate, values, link, className,
17
+ // scrollElementId,
18
+ optionsMenuRef = boxRef,
17
19
  // buttonClassName,
18
20
  showChips, chipTemplate, chipClassName, chipsParentClassName, showRemoveIcon, removeIconSize, removeIconClassName, onRemoveItem, isDraggable, onDranghandle, onShow, onHide, onFocus, confirmationOption, selectedOptionNone, type, emptyFilterMessage, emptyMessage, } = props;
19
21
  const [selectedItems, setSelectedItems] = (0, react_1.useState)([]);
20
22
  // const [inpValue, setInpValue] = useState<any>();
21
23
  // const [checked, setChecked] = useState<boolean>(false);
22
- const [buttonPosition, setButtonPosition] = (0, react_1.useState)(null);
24
+ // const [buttonPosition, setButtonPosition] = useState<number | null>(null);
23
25
  const buttonRef = (0, react_1.useRef)(null);
24
26
  const onSelectOption = (e) => {
25
27
  if (confirmationOption === true)
@@ -32,17 +34,15 @@ const ListBoxDropdown = (props) => {
32
34
  (0, react_1.useEffect)(() => {
33
35
  setSelectedItems(values);
34
36
  }, [values]);
35
- const handleScroll = (e) => {
36
- if (optionsMenuRef === null || optionsMenuRef === void 0 ? void 0 : optionsMenuRef.current)
37
- optionsMenuRef.current.hide(e);
38
- };
39
- (0, react_1.useEffect)(() => {
40
- if (scrollElementId) {
41
- let elm = document.getElementById(`${scrollElementId}`);
42
- if (elm)
43
- elm.addEventListener("scroll", handleScroll);
44
- }
45
- }, []);
37
+ // const handleScroll = (e: any) => {
38
+ // if (optionsMenuRef?.current) optionsMenuRef.current.hide(e);
39
+ // };
40
+ // useEffect(() => {
41
+ // if (scrollElementId) {
42
+ // let elm = document.getElementById(`${scrollElementId}`);
43
+ // if (elm) elm.addEventListener("scroll", handleScroll);
44
+ // }
45
+ // }, []);
46
46
  const handleDragStart = (e, index) => {
47
47
  e.dataTransfer.setData("text/plain", index);
48
48
  };
@@ -80,28 +80,26 @@ const ListBoxDropdown = (props) => {
80
80
  // optionsMenuRef?.current.hide(e)
81
81
  // }
82
82
  // }
83
- (0, react_1.useEffect)(() => {
84
- const handleScroll = (e) => {
85
- var _a;
86
- if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
87
- const newPosition = (_a = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().top;
88
- // Hide overlay if the button position changes from the top
89
- if (buttonPosition !== null && newPosition !== buttonPosition) {
90
- if (optionsMenuRef === null || optionsMenuRef === void 0 ? void 0 : optionsMenuRef.current)
91
- optionsMenuRef.current.hide(e);
92
- }
93
- // Update the button position
94
- setButtonPosition(newPosition);
95
- }
96
- };
97
- window.addEventListener("scroll", handleScroll);
98
- return () => {
99
- window.removeEventListener("scroll", handleScroll);
100
- };
101
- }, [buttonPosition]);
83
+ // useEffect(() => {
84
+ // const handleScroll = (e) => {
85
+ // if (buttonRef?.current) {
86
+ // const newPosition = buttonRef?.current?.getBoundingClientRect().top;
87
+ // // Hide overlay if the button position changes from the top
88
+ // if (buttonPosition !== null && newPosition !== buttonPosition) {
89
+ // if (optionsMenuRef?.current) optionsMenuRef.current.hide(e);
90
+ // }
91
+ // // Update the button position
92
+ // setButtonPosition(newPosition);
93
+ // }
94
+ // };
95
+ // window.addEventListener("scroll", handleScroll);
96
+ // return () => {
97
+ // window.removeEventListener("scroll", handleScroll);
98
+ // };
99
+ // }, [buttonPosition]);
102
100
  return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `${className}` }, { children: [(0, jsx_runtime_1.jsx)(menu_1.Menu, { onShow: (e) => onShow && onShow(e), onHide: (e) => onHide && onHide(e), onFocus: (e) => onFocus && onFocus(e), popup: true, ref: optionsMenuRef,
103
101
  // onMouseLeave={onMouseLeaveMenu}
104
- id: "popup_menu_bottom", className: menuClassName ? menuClassName : "", model: [
102
+ id: "popup_menu_bottom", className: menuClassName ? menuClassName : "", appendTo: "self", model: [
105
103
  {
106
104
  template: () => ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: listBoxParentClassName
107
105
  ? listBoxParentClassName +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "6.3.80",
3
+ "version": "6.3.82",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",