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

Input missing step attribute #3945

Open
Kastier1 opened this issue Sep 17, 2024 · 3 comments
Open

Input missing step attribute #3945

Kastier1 opened this issue Sep 17, 2024 · 3 comments
Labels
bug Something isn't working linear Created by Linear-GitHub Sync

Comments

@Kastier1
Copy link

Describe the bug
A clear and concise description of what the bug is.
rx.input does not support the step attribute

step attribute:
https://www.w3schools.com/tags/att_input_step.asp

To Reproduce
Steps to reproduce the behavior:

  • Code/Link to Repo:
    rx.input(type="number",step="any",placeholder="10" )

The above code produces:
<input spellcheck="false" placeholder="10" type="number" title="" id="radix-:r2n:" name="number" class="rt-reset rt-TextFieldInput">

Expected behavior
A clear and concise description of what you expected to happen.
The code should produce
<input spellcheck="false" placeholder="10" step="any" type="number" title="" id="radix-:r2n:" name="number" class="rt-reset rt-TextFieldInput">

Screenshots
If applicable, add screenshots to help explain your problem.

Specifics (please complete the following information):

  • Python Version: Python 3.11.5
  • Reflex Version: 0.5.10/ 0.6.0a1
  • OS:
  • Browser (Optional):

Additional context
Add any other context about the problem here.

@Kastier1 Kastier1 added bug Something isn't working linear Created by Linear-GitHub Sync labels Sep 17, 2024
@Kastier1
Copy link
Author

Its also missing the autocomplete attribute
rx.input(type="number",autocomplete="off",placeholder="10" )
produces

it should produce

@ElijahAhianyo
Copy link
Collaborator

ElijahAhianyo commented Sep 19, 2024

mm, I see. the input component doesn't support these out of the box, I think you would want to try rx.el.input instead. This uses vanilla html

@picklelo
Copy link
Contributor

@ElijahAhianyo it looks like rx.input inherits from rx.el.Div - should we instead make it subclass rx.el.Input? I don't remember why we didn't, is it because the Radix input doesn't support all the props of a normal input?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linear Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

3 participants