feat(ui): replaces n-table with XNDataTable for recipe options (fixes #334)#335
Conversation
Uses XNDataTable to display recipe options, to support sorting by column
✅ Deploy Preview for prunplanner-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@cnwangjie Thank you, great idea to replace this. We should definitely have some sort of indicator for the active cell. Columns prop would be fine for me, essentially the current border indicator is just the "easiest way" in a normal table, if you have another indicator idea - totally fine, feel free to play around! |
@jplacht I'm glad to hear you. I just add a green dot to indicate the active status. |
according to format config
Hi, @jplacht
I often choose the most cost-effective recipe here. Other tables can be sorted, but only this one cannot be sorted, which puzzles me. So I tried to make some changes to achieve that.
I refer to your implementation elsewhere and use
XNDataTableto replace originaln-table.It mostly works well. Except the green active mark. Because I cannot pass class to table cell.
Although DataTable has a
cellPropson DataTableColumn, the XNDataTable as a wrapper doesn't pass all props.We can pass columns props directly to solve this. But perhaps we can simply change the style to bypass it. I'd like to hear from you.