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

TextField min width behaviour #571

Open
ethanalvizo opened this issue Jun 21, 2024 · 1 comment
Open

TextField min width behaviour #571

ethanalvizo opened this issue Jun 21, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@ethanalvizo
Copy link
Contributor

Description
TextField component seems to have it's own minimum width defined. When put inside a grid container it will not shrink to the same size as expected

Steps to reproduce

  1. Paste code below into terminal
from deephaven import ui
@ui.component
def my_input():
    text, set_text = ui.use_state("hello")
    count, set_count = ui.use_state(0)

    return ui.grid(
        ui.action_button(
            f"You pressed me {count} times", on_press=lambda _: set_count(count + 1)
        ),
        ui.text_field(value=text, on_change=set_text),
        ui.text(f"You typed {text}"),
        rows="100px 10px 10px",
        columns="10px"
    )


result = my_input()

Expected results
Component matches width of grid

Actual results
Component retains a larger width despite being inside a grid container of a smaller size

Additional details and attachments
Discovered in #552

Versions

  • Engine Version: ...
  • Web UI Version: ...
  • Java Version: ...
  • Barrage Version: ...
  • OS: ...
  • Browser: ...
  • Docker: ...
@ethanalvizo ethanalvizo added bug Something isn't working triage labels Jun 21, 2024
@mofojed
Copy link
Member

mofojed commented Jun 25, 2024

Same with Pickers and such. Not sure how we want to handle these fields in a grid.

@mofojed mofojed removed the triage label Jun 25, 2024
@mofojed mofojed added this to the Backlog milestone Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants