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

Setting TextField.max_length should not display the counter by default #4273

Closed
ndonkoHenri opened this issue Oct 31, 2024 · 3 comments · Fixed by #4403
Closed

Setting TextField.max_length should not display the counter by default #4273

ndonkoHenri opened this issue Oct 31, 2024 · 3 comments · Fixed by #4403
Assignees
Labels
enhancement Improvement/Optimization

Comments

@ndonkoHenri
Copy link
Contributor

I'm using a Textfield, and I want to limit the characters to 15, but I dont want to see the counter under the Textfield. I'm trying to delete using counter_text = None or '', but still appearing. In the documentation, show a property called counter, but it doesn't exist. Im using flet = 0.21.2. How can I delete this. Thanks
image

Code sample

ft.TextField(
            label="Motivo",
            expand=2,
            visible=False,
            on_change=self.mensaje,
            max_length=15,
            counter_text='',
            input_filter=ft.TextOnlyInputFilter(),
            capitalization="CHARACTERS"
        )

Originally posted by @ingdesarr1 in #4224

@ndonkoHenri ndonkoHenri added the enhancement Improvement/Optimization label Oct 31, 2024
@ndonkoHenri ndonkoHenri self-assigned this Oct 31, 2024
@ndonkoHenri ndonkoHenri moved this from 🆕 New to 🏗 In progress in Flet Development Nov 2, 2024
@headhunter5437
Copy link

I'm Pretty new to coding in general so im not sure if this will work for you but it did for me

counter_style=TextStyle(height=-1, color="surface,0")

@japr99
Copy link

japr99 commented Nov 25, 2024

work for me.

counter_style=ft.TextStyle(size=0)

@ndonkoHenri
Copy link
Contributor Author

Issue has been fixed in the latest prerelease. The counter text is no longer displayed by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement/Optimization
Projects
Archived in project
3 participants