Skip to content

[🐛 BUG] Unable to sort first column of table when using list of list of values #2606

@arcanaxion

Description

@arcanaxion

🔍 What went wrong?

Example:

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

data = [[1, 5], [2, 4], [3, 3], [4, 2], [5, 1]]  # sorting on the first column doesn't work when data is list of lovs

with tgb.Page() as page:
    tgb.table("{data}")

if __name__ == "__main__":
    gui = Gui(page=page)
    gui.run(run_browser=False, use_reloader=True)

Upon clicking the first column header to sort, the sort arrow indicator is updated but no sort is applied. The following is printed to console:

/home/app/.venv/lib/python3.10/site-packages/taipy/gui/data/pandas_data_accessor.py:403: TaipyGuiWarning: Cannot sort _TpD_tpec_TpExPr_data_TPMDL_1 on columns 0.
  _warn(f"Cannot sort {var_name} on columns {order_by}.")

The icon indicates a descending sort, but the table is unchanged:

Image

📦 Taipy Version

develop

📋 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

    Labels

    💥MalfunctionAddresses an identified problem.🔒 Staff onlyCan only be assigned to the Taipy R&D team🖰 GUIRelated to GUI🟩 Priority: LowLow priority and doesn't need to be rushed

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions