next-helios-fe 1.6.11 → 1.6.13
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
@@ -136,7 +136,7 @@ export const Autocomplete: React.FC<AutocompleteProps> = ({
|
|
136
136
|
placeholder={placeholder}
|
137
137
|
required={rest.required}
|
138
138
|
disabled={rest.disabled}
|
139
|
-
value={tempFilter}
|
139
|
+
value={tempFilter || ""}
|
140
140
|
onChange={(e) => {
|
141
141
|
setTempFilter(e.target.value);
|
142
142
|
}}
|
@@ -394,72 +394,70 @@ export const Table: TableComponentProps = ({
|
|
394
394
|
);
|
395
395
|
});
|
396
396
|
|
397
|
-
const dataArr =
|
398
|
-
?.
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
397
|
+
const dataArr = (
|
398
|
+
options?.toolbar?.pagination?.show !== false
|
399
|
+
? filteredData?.slice((page - 1) * maxRow, page * maxRow)
|
400
|
+
: filteredData
|
401
|
+
)?.map((item, index) => {
|
402
|
+
return (
|
403
|
+
<tr key={item.id}>
|
404
|
+
{checkbox && (
|
405
|
+
<td className="sticky left-0 w-8 px-4 py-1.5 bg-secondary-bg">
|
406
|
+
<Form.Checkbox
|
407
|
+
options={{ disableHover: true }}
|
408
|
+
checked={
|
409
|
+
selected?.find((selectedItem) => selectedItem.id === item.id)
|
410
|
+
? true
|
411
|
+
: false
|
412
|
+
}
|
413
|
+
onClick={(e) => {
|
414
|
+
if (
|
407
415
|
selected?.find((selectedItem) => selectedItem.id === item.id)
|
408
|
-
|
409
|
-
|
416
|
+
) {
|
417
|
+
setSelected(selected?.filter((prev) => prev.id !== item.id));
|
418
|
+
} else {
|
419
|
+
setSelected((prev) => [...prev, item]);
|
410
420
|
}
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
</td>
|
452
|
-
);
|
453
|
-
}
|
454
|
-
})}
|
455
|
-
{actionColumn && (
|
456
|
-
<td className="sticky right-0 w-8 px-4 py-1.5 bg-secondary-bg text-center">
|
457
|
-
{actionColumn(item)}
|
458
|
-
</td>
|
459
|
-
)}
|
460
|
-
</tr>
|
461
|
-
);
|
462
|
-
});
|
421
|
+
}}
|
422
|
+
/>
|
423
|
+
</td>
|
424
|
+
)}
|
425
|
+
{!options?.hideNumberColumn && (
|
426
|
+
<td className="sticky left-0 w-8 px-4 py-1.5 bg-secondary-bg text-center">
|
427
|
+
{(page - 1) * maxRow + index + 1}
|
428
|
+
</td>
|
429
|
+
)}
|
430
|
+
{header
|
431
|
+
?.filter((headerItem) => !excludedColumn?.includes(headerItem.key))
|
432
|
+
?.map((headerItem) => {
|
433
|
+
if (headerItem?.render) {
|
434
|
+
return (
|
435
|
+
<td
|
436
|
+
key={headerItem.key}
|
437
|
+
className="px-4 py-1.5 bg-secondary-bg whitespace-nowrap"
|
438
|
+
>
|
439
|
+
{headerItem.render(item)}
|
440
|
+
</td>
|
441
|
+
);
|
442
|
+
} else {
|
443
|
+
return (
|
444
|
+
<td
|
445
|
+
key={headerItem.key}
|
446
|
+
className="px-4 py-1.5 bg-secondary-bg whitespace-nowrap"
|
447
|
+
>
|
448
|
+
{item[headerItem.key as keyof typeof item]}
|
449
|
+
</td>
|
450
|
+
);
|
451
|
+
}
|
452
|
+
})}
|
453
|
+
{actionColumn && (
|
454
|
+
<td className="sticky right-0 w-8 px-4 py-1.5 bg-secondary-bg text-center">
|
455
|
+
{actionColumn(item)}
|
456
|
+
</td>
|
457
|
+
)}
|
458
|
+
</tr>
|
459
|
+
);
|
460
|
+
});
|
463
461
|
|
464
462
|
return (
|
465
463
|
<div className="flex flex-col gap-6 h-full">
|