fix: map widget duplication
This commit is contained in:
parent
7b4a8ac376
commit
1d8415a109
@ -565,6 +565,16 @@ collections:
|
||||
widget: map
|
||||
pattern: ['\[-([7-9][0-9]|1[0-2][0-9])\.', 'Must be between latitude -70 and -129']
|
||||
required: false
|
||||
- name: line_string
|
||||
label: Line String
|
||||
type: LineString
|
||||
widget: map
|
||||
required: false
|
||||
- name: polygon
|
||||
label: Polygon
|
||||
type: Polygon
|
||||
widget: map
|
||||
required: false
|
||||
- name: markdown
|
||||
label: Markdown
|
||||
file: _widgets/markdown.json
|
||||
|
@ -38,7 +38,6 @@ interface WithMapControlProps {
|
||||
|
||||
const withMapControl = ({ getFormat, getMap }: WithMapControlProps = {}) => {
|
||||
const MapControl: FC<WidgetControlProps<string, MapField>> = ({
|
||||
path,
|
||||
value,
|
||||
field,
|
||||
onChange,
|
||||
@ -84,7 +83,8 @@ const withMapControl = ({ getFormat, getMap }: WithMapControlProps = {}) => {
|
||||
onChange(format.writeGeometry(geometry, writeOptions));
|
||||
}
|
||||
});
|
||||
}, [disabled, field, mapContainer, onChange, path, value]);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Field
|
||||
|
Loading…
x
Reference in New Issue
Block a user