Skip to content

Commit

Permalink
Use a key on the content (bdlukaa#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-hann committed Mar 27, 2022
2 parents e1193de + 02886f5 commit 294a913
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Date format: DD/MM/YYYY
- Add `DynamicOverflow` layout widget, for one-run horizontal or vertical layout with an overflow widget
- Add `HorizontalScrollView` helper widget, with mouse wheel horizontal scrolling
- Long `content` widget no longer overflow in `ContentDialog` ([#242](https://github.com/bdlukaa/fluent_ui/issues/242))
- Content no longer loses state when the pane display mode is changed ([#250](https://github.com/bdlukaa/fluent_ui/pull/250))

## [3.9.1] - Input Update - [25/02/2022]

Expand Down
3 changes: 3 additions & 0 deletions lib/src/controls/navigation/navigation_view/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class NavigationViewState extends State<NavigationView> {
final _panelKey = GlobalKey();
final _listKey = GlobalKey();
final _scrollbarKey = GlobalKey();
final _contentKey = GlobalKey();

/// The overlay entry used for minimal pane
OverlayEntry? minimalOverlayEntry;
Expand Down Expand Up @@ -135,6 +136,7 @@ class NavigationViewState extends State<NavigationView> {
Widget build(BuildContext context) {
assert(debugCheckHasFluentTheme(context));
assert(debugCheckHasFluentLocalizations(context));
assert(debugCheckHasDirectionality(context));

final Brightness brightness = FluentTheme.of(context).brightness;
final NavigationPaneThemeData theme = NavigationPaneTheme.of(context);
Expand Down Expand Up @@ -263,6 +265,7 @@ class NavigationViewState extends State<NavigationView> {
).resolve(direction),
);
final Widget content = ClipRect(
key: _contentKey,
child: pane.displayMode == PaneDisplayMode.minimal
? widget.content
: DecoratedBox(
Expand Down

0 comments on commit 294a913

Please sign in to comment.