Skip to content

[πŸ› BUG] Predefined List Display Width Issue when Editing Table Cell (Taipy >3.1.1)Β #2664

Open
@lopezj1

Description

@lopezj1

πŸ” What went wrong?

List of Values (lov) in table cell during editing is very narrow doesn't use entire width of cell (Taipy > 3.1.1):

Taipy == 4.0.3
Image

Taipy == 3.1.1
Image

βœ… Expected Behavior

Width of lov values should take up the whole width allocated to the cell as seen in 3.1.1 output

πŸ”„ Steps to Reproduce

terminal

uv venv --python 3.11.9
uv pip install 'taipy==4.0.3"
uv run taipy run main.py 

main.py

from taipy.gui import Gui
import taipy.gui.builder as tgb
import pandas as pd

columns = ["mfg", "item", "maintenance_task", "frequency", "last_completed"]
rows = [
    ["John Deere", "D125 Tractor", "Oil Change", "Every 1 Month", "2024-06-01"],
    ["John Deere", "D125 Tractor", "Grease Bearings", "Every 1 Month", "2024-06-01"],
    ["John Deere", "D125 Tractor", "Tire Pressure", "Every 1 Month", "2024-06-01"],
]

df = pd.DataFrame(rows, columns=columns)

frequency_values = ["Every 1 Month", "Every 3 Months", "Every 1 Year"]

table_properties = {
    "editable[frequency]": True,
    "lov[frequency]": "{frequency_values}",
    "width[mfg]": "200px",
    "width[item]": "200px",
    "width[maintenance_task]": "200px",
    "width[frequency]": "400px",
    "width[last_completed]": "200px",
}

with tgb.Page() as page:
    tgb.table(
        data="{df}",
        rebuild=True,
        show_all=True,
        properties="{table_properties}",
        on_edit=True
    )
if __name__ == "__main__":
    Gui(page=page).run(title="Maintenance Schedule",
                       port=5500)

πŸ’» Runtime Environment

Windows 11, Version 136.0.7103.114 (Official Build) (64-bit), Python 3.11.9, Taipy 4.0.3

🌐 Browser (if applicable)

Chrome

πŸ–₯️ Operating System

Windows

πŸ“¦ Taipy Version

4.0.3

πŸ“‹ Additional Context (Optional)

πŸ“œ Code of Conduct

  • I have checked the existing issues to avoid duplicates.
  • I am willing to work on this issue (optional)

βœ… Acceptance Criteria

  • A reproducible unit test is added.
  • Code coverage is at least 90%.
  • The bug reporter validated the fix.
  • Relevant documentation updates or an issue created in

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions