Skip to content

Commit

Permalink
fix(marapp-admin): exclude edited layer from included layers dropdown…
Browse files Browse the repository at this point in the history
… [EP-3676]
  • Loading branch information
iacoshoria committed Jan 22, 2021
1 parent 0384a17 commit 60dd5e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/earth-admin/src/pages-client/layers/details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import { ErrorMessage } from '@hookform/error-message';
import Collapse from '@kunukn/react-collapse';
import classnames from 'classnames';
import { JSHINT } from 'jshint';
import { noop } from 'lodash';
import { merge } from 'lodash/fp';
import React, { useEffect, useRef, useState } from 'react';
Expand Down Expand Up @@ -493,7 +492,12 @@ export function LayerDetail(props: any) {
control={control}
getOptionLabel={(option) => option.name}
getOptionValue={(option) => option.id}
loadFunction={LayersService.getAllLayers}
loadFunction={(query) =>
LayersService.getAllLayers({
...query,
filter: ['slug', '!=', slug].join(''),
})
}
defaultValue={references || []}
selectedGroup={selectedGroup}
onChange={([e]) => e}
Expand Down

0 comments on commit 60dd5e8

Please sign in to comment.