Skip to content

Commit

Permalink
fix: navigation tree collapsing and expanding does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshor committed Mar 30, 2022
1 parent 827713a commit ba69d28
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions packages/widgetbook/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.8-beta

- fix: navigation tree collapsing and expanding does not work ([#159](https://github.com/widgetbook/widgetbook/issues/159))

## 2.0.7-beta

- fix: expanding of elements within the navigation is not working ([#156](https://github.com/widgetbook/widgetbook/issues/156))
Expand Down
10 changes: 5 additions & 5 deletions packages/widgetbook/lib/src/navigation/organizer_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ class OrganizerProvider extends StateChangeNotifier<OrganizerState> {
/// the `expanded`
void setExpandedRecursive(
List<ExpandableOrganizer> organizers, bool expanded) {
// Since this is modifying the object directly instead of modifying via
// copyWith, we need to call notifyListeners and are not emmitting a new
// state object. The state will be adjusted by adjusted the object.
for (final e in organizers) {
_setExpandedRecursive(e, expanded);
}
state = OrganizerState(
allCategories: state.allCategories,
filteredCategories: state.filteredCategories,
searchTerm: state.searchTerm,
);

notifyListeners();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class _ExpandButtonState extends State<ExpandButton> {
String tooltip;
if (widget.expandTo) {
icon = Icons.expand_more;
tooltip = 'Expand';
tooltip = 'Expand all';
} else {
icon = Icons.expand_less;
tooltip = 'Collapse';
tooltip = 'Collapse all';
}
return Tooltip(
message: tooltip,
Expand Down
2 changes: 1 addition & 1 deletion packages/widgetbook/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: widgetbook
description: A flutter storybook that helps professionals and teams to catalogue their widgets.
version: 2.0.7-beta
version: 2.0.8-beta
homepage: https://www.widgetbook.io?utm_source=youtube&utm_medium=link&utm_campaign=widgetbook
repository: https://github.com/widgetbook/widgetbook
issue_tracker: https://github.com/widgetbook/widgetbook/issues
Expand Down

0 comments on commit ba69d28

Please sign in to comment.