Skip to content

Commit

Permalink
chore: fix map resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikhaugstulen committed Nov 6, 2023
1 parent 304ca78 commit c42160c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export const DiscardDialog = ({
{header}
</ModalTitle>
<ModalContent>
{text}
<div style={{ margin: '5px 0' }}>
{text}
</div>
</ModalContent>
<ModalActions>
<ButtonStrip end>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ export class CoordinateField extends React.Component<Props, State> {
};
}

componentDidUpdate() {
// Invalidate map size to fix rendering bug
if (this.mapInstance && this.state.showMap) {
this.mapInstance.leafletElement.invalidateSize();
}
}

toSixDecimal = (value: string) => (parseFloat(value) ? parseFloat(value).toFixed(6) : null)

handleBlur = (key: string, value: any) => {
Expand Down

0 comments on commit c42160c

Please sign in to comment.