Replies: 2 comments
-
|
We don't have a good solution for this yet. One thing that we've been thinking of is to make widgets easier to implement by providing more "headless" building blocks. But I don't know what this would look like for list view or table view |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I suppose that I regard the ideal solution to be something that would look a lot like the existing SuperTableView {
sort-ascending(index) => {
root.sort-index = index;
root.sort-ascending = true;
}
sort-descending(index) => {
root.sort-index = index;
root.sort-ascending = false;
}
columns: [
{ title: @tr("Header 1") },
{ title: @tr("Header 2") },
{ title: @tr("Header 3") },
{ title: @tr("Header 4") },
];
for row in TableViewPageAdapter.row_data : SuperTableRow {
for col in row: SuperTableCell {
Image {
width: 24px;
source: @image-url("../../thumbsup.png");
}
Text {
text: col.text;
}
}
}
rows: TableViewPageAdapter.filter_sort_model(TableViewPageAdapter.row_data, filter-edit.text, root.sort-index, root.sort-ascending);
}
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Do we ever envision a more flexible version of
StandardListViewandStandardTableView?ListViewis a very flexible way to created repeated UX, but it forces the user to implement everything (selection, sorting column views etc). BothStandardListViewandStandardTableViewprovide very polished and localized experiences that provide all of this out of the box, but the problem is that they only support vanilla text specified in aStandardListViewItemI think the ideal scenario would be that we could have something like
StandardListViewandStandardTableViewthat would provide heavy lifting for selection, localized UX out of the box, but would allow the developer to populate cells with their own Slint controls rather than usingStandardListViewItemAn alternative to this approach would be to add additional fields to
StandardListViewItemfor things like icons, background imagery, text colors etc but even that would be very limiting in the long run.Beta Was this translation helpful? Give feedback.
All reactions