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: SearchBar.capitalization doesn't work as expected #5070

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Mar 11, 2025

Resolves #5014

Test Code

import flet as ft


def main(page: ft.Page):
    anchor = ft.SearchBar(
        view_elevation=4,
        divider_color=ft.Colors.AMBER,
        on_change=lambda _: anchor.open_view(),
        on_submit=lambda _: anchor.open_view(),
        on_tap=lambda _: anchor.open_view(),
        capitalization=ft.TextCapitalization.CHARACTERS,
    )
    page.add(anchor)


ft.app(target=main)

Summary by Sourcery

Fixes the SearchBar.capitalization property to correctly apply the specified capitalization to the text entered in the search bar.

Bug Fixes:

  • Fixes an issue where the SearchBar.capitalization property was not working as expected.
  • Applies the correct capitalization to the text entered in the search bar based on the TextCapitalization enum.

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.

SearchBar does not handle capitalization correctly
1 participant