-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
What went wrong? 🤔
In Taipy 4.0.2, the selector control (e.g., <|{value}|selector|...|width=120px|> in a <|layout|> or <|part|> with flex) renders as a full-width block element, ignoring width settings (e.g., width=70px, width=120px) and preventing horizontal alignment with input controls in layouts like columns or flex. This forces selector elements to occupy separate lines, even with flex-direction:row or max-content.
Provide steps to reproduce:
Create a Taipy GUI with mixed input and selector controls, e.g.:
Wrap
Copy
from taipy.gui import Gui
first_name = ""
status = None
statuses = ["Open", "Closed", "Pending"]
page = """
<|layout|columns=2|
<|{first_name}|input|label=First Name|width=120px|>
<|{status}|selector|lov={statuses}|dropdown|label=Status|width=120px|>
|>
"""
if __name__ == "__main__":
Gui(page).run(title="Test Layout")Observe that "First Name" (input) stays at 120px on one line, but "Status" (selector) renders full-width on a separate line, ignoring width=120px.
Include your environment: “Taipy 4.0.2, Python 3.x, Windows 10, using pip install taipy==4.0.2.”
Mention the impact: “This limitation prevents compact, one-line layouts for forms mixing input and selector, requiring workarounds like multi-line layouts or full-width selectors.
Acceptance Criteria
- A unit test reproducing the bug is added.
- Any new code is covered by a unit tested.
- Check code coverage is at least 90%.
- The bug reporter validated the fix.
- Related issue(s) in taipy-doc are created for documentation and Release Notes are updated.
Code of Conduct
- I have checked the existing issues.
- I am willing to work on this issue (optional)