Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: navigation tree collapsing and expanding does not work #160

Merged
merged 1 commit into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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