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

'Tailwind' object has no attribute 'value' #2916

Closed
miccs0 opened this issue Apr 18, 2024 · 1 comment
Closed

'Tailwind' object has no attribute 'value' #2916

miccs0 opened this issue Apr 18, 2024 · 1 comment

Comments

@miccs0
Copy link

miccs0 commented Apr 18, 2024

Description

If there is .tailwind() being used, you cannot set any values to an element.
This is a consistent error when trying to do something like this:

name = ui.input('Name').tailwind('capitalize')
name.value = ''

You have to workaround it like this:

style = Tailwind().font_size("xl")
title = ui.label('Title')
style.apply(title)
@rodja
Copy link
Member

rodja commented Apr 19, 2024

Yes that is expected behaviour. You should use the .element property of the Tailwind object:

name = ui.input('Name').tailwind('capitalize').element
name.value = ''

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

3 participants