Skip to content

Commit

Permalink
fix: allow resetting contentInset with 0 (#468)
Browse files Browse the repository at this point in the history
* fix: allow resetting contentInset with 0
* docs: update changelog
* fix: pass contentInset properly to native view
  • Loading branch information
KiwiKilian authored Oct 17, 2024
1 parent 2136ed1 commit 1fe42c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ PR Title ([#123](link to my pr))
```

fix: allow resetting contentInset with 0 ([#468](https://github.com/maplibre/maplibre-react-native/pull/468))

## 10.0.0-alpha.21

fix: Call requestProgress when getting pack status on IOS + example improvement [#445](https://github.com/maplibre/maplibre-react-native/pull/445)
Expand Down
5 changes: 2 additions & 3 deletions javascript/components/MapView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ const MapView = memo(
};

const contentInsetValue = useMemo(() => {
if (!props.contentInset) {
if (props.contentInset === undefined) {
return;
}

Expand Down Expand Up @@ -812,7 +812,7 @@ const MapView = memo(
surfaceView,
regionWillChangeDebounceTime,
regionDidChangeDebounceTime,
contentInsetValue,
contentInset: contentInsetValue,
style: styles.matchParent,
};
}, [
Expand All @@ -825,7 +825,6 @@ const MapView = memo(
surfaceView,
regionWillChangeDebounceTime,
regionDidChangeDebounceTime,
contentInsetValue,
props,
contentInsetValue,
]);
Expand Down

0 comments on commit 1fe42c6

Please sign in to comment.