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

Include step attribute in input #4073

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

Conversation

Joodith
Copy link

@Joodith Joodith commented Oct 5, 2024

Changed the base class of Text field from rx.el.Div to rx.el.Input and added the step attribute.Works in the case of value and on_change events being given(i.e DebounceInput ).

Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

looking at the radix source code, this is the correct inheritance structure, because any props that are not explicitly recognized by radix are passed directly to the wrapped <input> component.

@@ -68,6 +68,8 @@ class TextFieldRoot(elements.Div, RadixThemesComponent):
# Specifies the type of input
type: Var[str]

step: Var[int]
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this is being included for documentation purposes, please add a preceeding comment, which will be used to generate the docs for this component.

Copy link
Author

Choose a reason for hiding this comment

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

@masenf Should i add the comment alone and push again?

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.

2 participants