bug: DataTable2 is missing min_height

Đang mở
#6,499 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu bằng cách xác định phần triển khai DataTable2 và tài liệu API của nó, sau đó tái hiện trên Windows bảng bị giới hạn theo chiều dọc được mô tả trong issue. Theo dõi cách min_width và visible_vertical_scroll_bar được xử lý; công việc được xem là hoàn tất khi có tùy chọn min_height và tính năng cuộn dọc hoạt động khi bảng ngắn hơn phần không gian khả dụng cho nội dung của nó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
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

Ngôn ngữ chính
Python
Star
17.5k
Fork
740
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
65

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của flet-dev/flet

Tất cả issue của flet-dev/flet

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.