@addsign/moje-agenda-shared-lib 2.0.47 → 2.0.48
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.
|
@@ -508,11 +508,33 @@ function DataTableServer<T extends DataTableInternalItems>({
|
|
|
508
508
|
// load fresh complete data without pagination ,filters
|
|
509
509
|
setIsLoading(true);
|
|
510
510
|
|
|
511
|
+
//odebrani prazdny filteru a transformace multi-select hodnot
|
|
512
|
+
const filteredMergedFilters = Object.entries(mergedFilters || {}).reduce(
|
|
513
|
+
(acc: Record<string, any>, [key, value]) => {
|
|
514
|
+
// Skip null and empty string values
|
|
515
|
+
if (value === null || value === "") {
|
|
516
|
+
return acc;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// Handle multi-select values (arrays)
|
|
520
|
+
if (Array.isArray(value)) {
|
|
521
|
+
if (value.length > 0) {
|
|
522
|
+
acc[key] = value.join(",");
|
|
523
|
+
}
|
|
524
|
+
return acc;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
// Handle other values
|
|
528
|
+
acc[key] = value;
|
|
529
|
+
return acc;
|
|
530
|
+
},
|
|
531
|
+
{}
|
|
532
|
+
);
|
|
533
|
+
|
|
511
534
|
federationContext.apiClient
|
|
512
535
|
.get(url, {
|
|
513
536
|
params: {
|
|
514
|
-
...
|
|
515
|
-
...(showColFilters ? columnFilters : {}),
|
|
537
|
+
...filteredMergedFilters,
|
|
516
538
|
pageSize: 1000000,
|
|
517
539
|
page: 0,
|
|
518
540
|
sortBy: sortConfig?.sortParam,
|
|
@@ -601,7 +623,7 @@ function DataTableServer<T extends DataTableInternalItems>({
|
|
|
601
623
|
setIsLoading,
|
|
602
624
|
federationContext.apiClient,
|
|
603
625
|
url,
|
|
604
|
-
|
|
626
|
+
mergedFilters,
|
|
605
627
|
showColFilters,
|
|
606
628
|
columnFilters,
|
|
607
629
|
sortConfig,
|