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

[GFAppBar] clear button does not fire onChanged #149

Closed
luiszheng0627 opened this issue May 14, 2020 · 2 comments
Closed

[GFAppBar] clear button does not fire onChanged #149

luiszheng0627 opened this issue May 14, 2020 · 2 comments
Assignees

Comments

@luiszheng0627
Copy link

Describe the bug
GFAppBar with searchBar: true, it will show x button when search bar expanded.
If taps this button, search bar input would be cleared with collapsed.
But, even though text changed, no onChanged callback fired.

To Reproduce

GFAppBar(
        title: Text('Search'),
        searchBar: true,
        onChanged: onQueryChanged,
        searchBarColorTheme: Colors.black,
        searchHintStyle: Get.textTheme.headline1.apply(
          color: Colors.black,
        ),
      )
  1. tap search magnifying button to expand
  2. input something with checking onChanged works
  3. tap X right side, to collapse search bar.
  4. no onChanged fired
  5. repeat step1 again to see what current input is (it would be empty.)

Expected behavior
At step3, we need to get onChanged with empty string
And / Or searchbar event for expand / collapse

@Abishek1997
Copy link

Yes, it needs to be fixed. Should be quite easy to do right? Could simply set the searchController to an empty string to reset the searchbar. Please look into it :)

@deepikahr
Copy link
Contributor

@zl910627 Hey, x button is only for search bar expand / collapse purpose.

5.repeat step1 again to see what current input is (it would be empty.), this will be fixed in upcoming version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants