Skip to content

Commit

Permalink
custom filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
anamontiaga committed Sep 6, 2023
1 parent dc6a315 commit 36d7fda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const RowItem = ({
className="block h-4 w-4 checked:bg-blue-400"
onChange={onSelectRow}
value={id}
checked={selectedIds.includes(id)}
checked={isCustom && selectedIds.includes(id)}
disabled={!isCustom}
/>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ const InventoryPanelProtectedAreas = ({
}
);

const WDPAIds = allProjectWDPAsQuery.data?.map((wdpa) => wdpa.id);
const WDPAIds = allProjectWDPAsQuery.data
?.filter((wdpa) => wdpa.attributes.isCustom)
.map((wdpa) => wdpa.id);

const handleSelectAll = useCallback(
(evt: ChangeEvent<HTMLInputElement>) => {
Expand Down

0 comments on commit 36d7fda

Please sign in to comment.