Skip to content

Commit

Permalink
minor things
Browse files Browse the repository at this point in the history
  • Loading branch information
agnlez committed Dec 13, 2023
1 parent ddfc562 commit a2f16c7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const SplitModal = ({

selectedFeaturesMutation.mutate(
{
id: `${sid}`,
id: sid,
data: {
status: 'draft',
features: selectedFeaturesQuery.data.map((sf) => {
Expand Down Expand Up @@ -204,7 +204,10 @@ const SplitModal = ({
clearSelectionLabel="Clear selection"
selected={values.splitOption}
options={SPLIT_OPTIONS}
onChange={fprops.input.onChange}
onChange={(v) => {
fprops.input.onChange(v);
setSplitFeaturesSelected([]);
}}
/>
</div>
</Field>
Expand All @@ -223,7 +226,7 @@ const SplitModal = ({
(sfs) => sfs.id === `${value.name}`
);
return (
<div key={value.name} className="flex items-center space-x-2.5">
<div key={value.name} className="flex items-center space-x-2.5 pl-1">
<Checkbox
id={`checkbox-${value.name}`}
value={`${value.name}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const TargetsSPFTable = ({
<tbody className="block h-full divide-y divide-gray-600 py-2 align-baseline text-sm">
{data.map((item) => (
<RowItem
key={item.id}
key={item.splitted ? `${item.id}-${item.value}` : `${item.id}`}
item={item}
selectedIds={selectedIds}
onSelectRow={onSelectRow}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const RowItem = ({
})}
>
<span className="inline-flex">{name}</span>
{isCustom && scenarioUsageCount && (
{Boolean(isCustom && scenarioUsageCount) && (
<div className="mt-1.5 text-xs text-gray-400">
Currently in use in{' '}
<span className="rounded bg-blue-600 bg-opacity-10 px-1 text-blue-600">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type DataItem = {
isVisibleOnMap: boolean;
isCustom?: boolean;
type: Feature['tag'];
splitted: boolean;
marxanSettings: Record<'prop' | 'spf', number>;
splitOptions: { key: string; label: string; values: { id: string; name: string }[] }[];
value?: string;
Expand Down

0 comments on commit a2f16c7

Please sign in to comment.