Skip to content

Commit

Permalink
fix(UX-1357): Top app bar now launches search correctly (#239)
Browse files Browse the repository at this point in the history
* deps: Update widgetbook to use @annotations (#234)

 ci: Fix build path
fix(widgetbook): Initial zeta provider settings

* fix(UX-1357): Top app bar now launches search correctly

* fix(UX-1357): Top app bar now launches search correctly

* fix: TopAppBar search in widgetbook

* fix(UX-1360): Text fields now get properly disabled

---------

Co-authored-by: Luke Walton <[email protected]>
Co-authored-by: thelukewalton <[email protected]>
  • Loading branch information
3 people authored Jan 16, 2025
1 parent bd596d5 commit 99fe33a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/lib/pages/components/top_app_bar_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TopAppBarExample extends StatefulWidget {
}

class _TopAppBarExampleState extends State<TopAppBarExample> {
final _searchController = ZetaSearchController();
final _searchController = ZetaSearchController()..startSearch();

@override
Widget build(BuildContext context) {
Expand Down
1 change: 1 addition & 0 deletions lib/src/components/text_input/text_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class ZetaTextInput extends ZetaTextFormField {

return InternalTextInput(
label: label,
disabled: disabled,
rounded: rounded,
hintText: hintText,
placeholder: placeholder,
Expand Down
5 changes: 5 additions & 0 deletions lib/src/components/top_app_bar/search_top_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ class _ZetaTopAppBarSearchFieldState extends State<ZetaTopAppBarSearchField> wit
widget.searchController?.addListener(_onSearchControllerChanged);
widget.searchController?.textEditingController ??= TextEditingController();

if (_isSearching) {
_animationController.value = 1.0;
_textFocusNode.requestFocus();
}

super.initState();
}

Expand Down

0 comments on commit 99fe33a

Please sign in to comment.