next-helios-fe 1.10.4 → 1.10.6
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/package.json
CHANGED
@@ -93,7 +93,12 @@ export const ModalSelect: React.FC<ModalSelectProps> = ({
|
|
93
93
|
setMaxData((prev: any) => prev + 20);
|
94
94
|
if (dynamicSelect?.getValue) {
|
95
95
|
dynamicSelect?.getValue({
|
96
|
-
filter: [
|
96
|
+
filter: [
|
97
|
+
{
|
98
|
+
...(data.searchableColumns ? { key: searchBy } : {}),
|
99
|
+
value: delayedSearch,
|
100
|
+
},
|
101
|
+
],
|
97
102
|
maxRow: maxData + 20,
|
98
103
|
});
|
99
104
|
}
|
@@ -123,7 +128,12 @@ export const ModalSelect: React.FC<ModalSelectProps> = ({
|
|
123
128
|
useEffect(() => {
|
124
129
|
if (dynamicSelect?.getValue) {
|
125
130
|
dynamicSelect.getValue({
|
126
|
-
filter: [
|
131
|
+
filter: [
|
132
|
+
{
|
133
|
+
...(data.searchableColumns ? { key: searchBy } : {}),
|
134
|
+
value: delayedSearch,
|
135
|
+
},
|
136
|
+
],
|
127
137
|
maxRow: maxData,
|
128
138
|
});
|
129
139
|
}
|
@@ -245,7 +255,9 @@ export const ModalSelect: React.FC<ModalSelectProps> = ({
|
|
245
255
|
{(dynamicSelect?.getValue
|
246
256
|
? delayedSearch
|
247
257
|
? data.menus.filter((optionItem: any) =>
|
248
|
-
optionItem
|
258
|
+
optionItem[
|
259
|
+
data.searchableColumns && searchBy ? searchBy : "label"
|
260
|
+
]
|
249
261
|
.toLowerCase()
|
250
262
|
.includes(delayedSearch.toLowerCase())
|
251
263
|
)
|
@@ -259,7 +271,11 @@ export const ModalSelect: React.FC<ModalSelectProps> = ({
|
|
259
271
|
),
|
260
272
|
]
|
261
273
|
: data.menus.filter((optionItem: any) =>
|
262
|
-
optionItem
|
274
|
+
optionItem[
|
275
|
+
data.searchableColumns && searchBy ? searchBy : "label"
|
276
|
+
]
|
277
|
+
.toLowerCase()
|
278
|
+
.includes(search.toLowerCase())
|
263
279
|
)
|
264
280
|
)?.length === 0 ? (
|
265
281
|
<div className="flex-1 flex justify-center items-center">
|
@@ -269,7 +285,9 @@ export const ModalSelect: React.FC<ModalSelectProps> = ({
|
|
269
285
|
(dynamicSelect?.getValue
|
270
286
|
? delayedSearch
|
271
287
|
? data.menus.filter((optionItem: any) =>
|
272
|
-
optionItem
|
288
|
+
optionItem[
|
289
|
+
data.searchableColumns && searchBy ? searchBy : "label"
|
290
|
+
]
|
273
291
|
.toLowerCase()
|
274
292
|
.includes(delayedSearch.toLowerCase())
|
275
293
|
)
|
@@ -283,7 +301,9 @@ export const ModalSelect: React.FC<ModalSelectProps> = ({
|
|
283
301
|
),
|
284
302
|
]
|
285
303
|
: data.menus.filter((optionItem: any) =>
|
286
|
-
optionItem
|
304
|
+
optionItem[
|
305
|
+
data.searchableColumns && searchBy ? searchBy : "label"
|
306
|
+
]
|
287
307
|
.toLowerCase()
|
288
308
|
.includes(search.toLowerCase())
|
289
309
|
)
|
@@ -998,8 +998,8 @@ export const Table: TableComponentProps = ({
|
|
998
998
|
options={{ disableHover: true }}
|
999
999
|
disabled={loading}
|
1000
1000
|
checked={
|
1001
|
-
|
1002
|
-
|
1001
|
+
// dynamicTable?.setValue?.totalData
|
1002
|
+
filteredData?.length !== 0 &&
|
1003
1003
|
filteredData?.filter((item) => {
|
1004
1004
|
return selected?.find((selectedItem) => {
|
1005
1005
|
return (
|
@@ -1008,9 +1008,7 @@ export const Table: TableComponentProps = ({
|
|
1008
1008
|
] === item[options?.customDataIdName ?? "id"]
|
1009
1009
|
);
|
1010
1010
|
});
|
1011
|
-
})?.length ===
|
1012
|
-
(dynamicTable?.setValue?.totalData ??
|
1013
|
-
filteredData?.length)
|
1011
|
+
})?.length === filteredData?.length
|
1014
1012
|
? true
|
1015
1013
|
: false
|
1016
1014
|
}
|
@@ -1024,9 +1022,7 @@ export const Table: TableComponentProps = ({
|
|
1024
1022
|
] === item[options?.customDataIdName ?? "id"]
|
1025
1023
|
);
|
1026
1024
|
});
|
1027
|
-
})?.length ===
|
1028
|
-
(dynamicTable?.setValue?.totalData ??
|
1029
|
-
filteredData?.length)
|
1025
|
+
})?.length === filteredData?.length
|
1030
1026
|
) {
|
1031
1027
|
if (checkbox?.onChange) {
|
1032
1028
|
checkbox?.onChange(
|