sprint-asia-custom-component 0.1.20 → 0.1.22
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.js
CHANGED
|
@@ -46539,6 +46539,7 @@
|
|
|
46539
46539
|
valueOptions = ["Loading..."],
|
|
46540
46540
|
placeholderSearch = "Search Here",
|
|
46541
46541
|
filterDropdown = "Filter",
|
|
46542
|
+
setFilterDropdown,
|
|
46542
46543
|
setValueFilterDropdown,
|
|
46543
46544
|
filterSearch,
|
|
46544
46545
|
setValueFilterSearch,
|
|
@@ -46551,8 +46552,9 @@
|
|
|
46551
46552
|
onEnterPress();
|
|
46552
46553
|
}
|
|
46553
46554
|
};
|
|
46554
|
-
const handleClickOption = value => {
|
|
46555
|
+
const handleClickOption = (data, value) => {
|
|
46555
46556
|
setIsOpen(false);
|
|
46557
|
+
setFilterDropdown(data);
|
|
46556
46558
|
setValueFilterDropdown(value);
|
|
46557
46559
|
};
|
|
46558
46560
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -46579,7 +46581,7 @@
|
|
|
46579
46581
|
}, options?.length > 0 ? options.map((option, index) => /*#__PURE__*/React__default["default"].createElement("div", {
|
|
46580
46582
|
key: index,
|
|
46581
46583
|
className: "hover:bg-neutral20 bg-white py-2.5 px-4 my-0.5 rounded-md cursor-pointer",
|
|
46582
|
-
onClick: () => handleClickOption(valueOptions[index])
|
|
46584
|
+
onClick: () => handleClickOption(option, valueOptions[index])
|
|
46583
46585
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
46584
46586
|
className: "flex justify-between"
|
|
46585
46587
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ const SearchDropdown = ({
|
|
|
6
6
|
valueOptions = ["Loading..."],
|
|
7
7
|
placeholderSearch = "Search Here",
|
|
8
8
|
filterDropdown = "Filter",
|
|
9
|
+
setFilterDropdown,
|
|
9
10
|
setValueFilterDropdown,
|
|
10
11
|
filterSearch,
|
|
11
12
|
setValueFilterSearch,
|
|
@@ -20,8 +21,9 @@ const SearchDropdown = ({
|
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
|
|
23
|
-
const handleClickOption = (value) => {
|
|
24
|
+
const handleClickOption = (data, value) => {
|
|
24
25
|
setIsOpen(false)
|
|
26
|
+
setFilterDropdown(data)
|
|
25
27
|
setValueFilterDropdown(value)
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -50,7 +52,7 @@ const SearchDropdown = ({
|
|
|
50
52
|
<div
|
|
51
53
|
key={index}
|
|
52
54
|
className='hover:bg-neutral20 bg-white py-2.5 px-4 my-0.5 rounded-md cursor-pointer'
|
|
53
|
-
onClick={() => handleClickOption(valueOptions[index])}
|
|
55
|
+
onClick={() => handleClickOption(option, valueOptions[index])}
|
|
54
56
|
>
|
|
55
57
|
<div className='flex justify-between'>
|
|
56
58
|
<p className='text-sm text-black font-semibold'>{option}</p>
|