Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
majkshkurti committed Oct 18, 2024
1 parent 0c95c5e commit 102ec9e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@ const Aggregate = ({ onBack, onClose, type }: AggregateProps) => {
setStatisticField,
} = useStatisticValues();

const { layerFields: allSourceLayerFields } = useLayerFields(
const { layerFields: statisticLayerFields } = useLayerFields(
sourceLayerDatasetId || "",
statisticMethodSelected?.value === "count" ? undefined : "number"
);

const { layerFields: allSourceLayerFields } = useLayerFields(sourceLayerDatasetId || "");

const isValid = useMemo(() => {
if (
(areaType?.value === areaTypeEnum.Enum.feature && !selectedAreaLayer) ||
Expand Down Expand Up @@ -322,7 +324,7 @@ const Aggregate = ({ onBack, onClose, type }: AggregateProps) => {
tooltip={t("select_statistic_method_tooltip")}
/>
<LayerFieldSelector
fields={allSourceLayerFields}
fields={statisticLayerFields}
selectedField={statisticField}
disabled={!statisticMethodSelected}
setSelectedField={(field) => {
Expand Down

0 comments on commit 102ec9e

Please sign in to comment.