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: setting SearchBar.value to an empty string is not respected #3872

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Aug 25, 2024

Description

Fixes #3871

Summary by Sourcery

Fix the issue where setting SearchBar.value to an empty string was not respected by providing a default value in the attribute retrieval.

Bug Fixes:

  • Ensure that setting SearchBar.value to an empty string is respected by providing a default value in the attribute retrieval.

@ndonkoHenri ndonkoHenri linked an issue Aug 25, 2024 that may be closed by this pull request
1 task
Copy link
Contributor

sourcery-ai bot commented Aug 25, 2024

Reviewer's Guide by Sourcery

This pull request addresses an issue where setting the SearchBar.value to an empty string was not being respected. The fix involves modifying how the value attribute is retrieved and handled in the SearchAnchorControl widget.

File-Level Changes

Change Details Files
Modified the retrieval of the 'value' attribute in the SearchAnchorControl widget
  • Removed debug print statement for SearchAnchor build
  • Changed the retrieval of 'value' attribute to use a default empty string
  • Simplified the code by combining two lines into one
packages/flet/lib/src/controls/search_anchor.dart

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ndonkoHenri - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a brief comment explaining why the default empty string is necessary for the attrString method call. This would help future maintainers understand the reasoning behind this fix.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@FeodorFitsner FeodorFitsner merged commit 874d86c into main Aug 27, 2024
3 checks passed
@FeodorFitsner FeodorFitsner deleted the fix-empty-searchbar-value branch August 27, 2024 04:45
@Katsiuk
Copy link

Katsiuk commented Sep 7, 2024

Now it works, but nothing changes in the WEB version. Please take a look.

FYI.

@ndonkoHenri
Copy link
Contributor Author

Now it works, but nothing changes in the WEB version. Please take a look.

It works on my end with the example code from the example issue. Feel free to open a new issue with complete details to repro the issue.

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

Successfully merging this pull request may close these issues.

Setting SearchBar.value to an empty string is not respected
3 participants