Setting `TextField.max_length` should not display the counter by default
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
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 https://github.com/flet-dev/flet/discussions/4224
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")
work for me.
counter_style=ft.TextStyle(size=0)
Issue has been fixed in the latest prerelease. The counter text is no longer displayed by default.