Closed wasimsandhu closed 3 weeks ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
marimo-docs | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jun 11, 2024 10:08pm |
marimo-storybook | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jun 11, 2024 10:08pm |
Summarizing how I'm blocked here after moving the sort state and function call to LoadingDataTableComponent
.
Currently, LoadingDataTableComponent
is rendered when the given data
prop is of type string
(CSV urls for large data). It then renders DataTableComponent
. The sorting
state is passed like:
SortingState pair -> LoadingDataTableComponent -> DataTableComponent -> DataTable
The problem is that DataTableComponent
can be conditionally rendered when data
is not a file url but contains the actual data, which means this component needs to 1) be able to call the sort function itself, and 2) do it without interfering with a possible upstream LoadingDataTableComponent
.
I think the solution here is to get rid of Loading
and merge the loading logic into DataTableComponent
, but I don't want to perform that refactoring in case there was a specific reason to have two components instead of one.
Adding some unit tests, brb.
π Development release published. You may be able to view the changes at https://marimo.app?v=0.6.18-dev9
Woohoo!
π Summary
Moves column sorting to the backend for
mo.ui.table
, enabling full table sort per #1573.π Description of Changes
sort_values
function inmo.ui.table
with arguments for single-column sort.data-table.tsx
for server-side sorting (see this SO thread).DataTableComponent
fromLoadingDataTableComponent
instead ofDataTablePlugin
.sort_values
function inLoadingDataTableComponent
and pass sort state toDataTableComponent
, which passes it toDataTable
.β° To Do
mo.ui.dataframe
(?)π Checklist
π Reviewers
@akshayka AND @mscolnick