Skip to content

bug: DataTable2 is missing min_height #6499

@nelson-python

Description

@nelson-python

Duplicate Check

Describe the bug

We notice with a DataTable2, a min_width attribute.

Per the DataTabe2 documentation:

min_width - Minimum table width before horizontal scrolling kicks in.

We notice when using the min_width, that a horizontal scrollbar appears if both the DataTable2 length size falls below the min_width threshold and the visible_horizontal_scroll_bar attribute is set to true.

Image

We also notice that DataTable2 has a visible_vertical_scroll_bar attribute, which like the visible_horizontal_scroll_bar attribute displays a vertical scrollbar (presumably if the DataTable2 height size falls below some threshold).

We notice in the DataTable2 API documentation:

https://flet-dev.github.io/flet-datatable2/datatable2/#flet_datatable2.datatable2.DataTable2.vertical_lines

...that there's a min_width attribute, but no min_height attribute.

Because of that, when shrinking a table (vertically) we notice no scrollbar:

Image

This is a problem, as without a scrollbar, the only way to view the other rows (that are hidden by the vertical shrinking of the window) in the DataTable2 is to maximize the DataTable2 window (rather than use a scrollbar).

Nelson

Code sample

Code
[Paste your code here]

To reproduce

Please see issue description.

Expected behavior

No response

Screenshots / Videos

Captures

[Upload media here]

Operating System

Windows

Operating system details

Windows 11 Professional

Flet version

0.84.0

Regression

No, it isn't

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions