Skip to content

Commit

Permalink
feat: Display "Processing..." for claimed sites in ResultsTableCompon…
Browse files Browse the repository at this point in the history
…ent table row
  • Loading branch information
1000daysofcode committed Mar 19, 2024
1 parent 248c77b commit 64c9815
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/demo/public/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@
}
]
}
]
],
"claimedText": "Processing..."
},
"resultSummaryOptions": {
"title": "Ergebnisse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
export let title: string = "";
let claimedText: string;
$: claimedText =
(($lensOptions?.tableOptions &&
$lensOptions.tableOptions?.claimedText &&
$lensOptions.tableOptions.claimedText) as string) ||
"Processing...";
/**
* data-types for the table
* can be set via options component
Expand All @@ -47,7 +54,7 @@
tableRowData = [];
responseStore.forEach((value: Site, key: string): void => {
if (value.status !== "succeeded") return;
if (!["claimed", "succeeded"].includes(value.status)) return;
let tableRow: (string | number)[] = [];
Expand All @@ -65,6 +72,12 @@
tableRow.push(name);
return;
}
if (value.status === "claimed") {
tableRow.push(claimedText);
return;
}
if (header.dataKey) {
tableRow.push(
getSitePopulationForCode(
Expand Down

0 comments on commit 64c9815

Please sign in to comment.