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