Skip to content

feat(ui): replaces n-table with XNDataTable for recipe options (fixes #334)#335

Merged
jplacht merged 4 commits intoPRUNplanner:mainfrom
cnwangjie:feature/recipt-select
Jan 29, 2026
Merged

feat(ui): replaces n-table with XNDataTable for recipe options (fixes #334)#335
jplacht merged 4 commits intoPRUNplanner:mainfrom
cnwangjie:feature/recipt-select

Conversation

@cnwangjie
Copy link
Copy Markdown
Contributor

@cnwangjie cnwangjie commented Jan 25, 2026

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 XNDataTable to replace original n-table.

after before
image Image

It mostly works well. Except the green active mark. Because I cannot pass class to table cell.
Although DataTable has a cellProps on 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.

Uses XNDataTable to display recipe options, to support sorting by column
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 25, 2026

Deploy Preview for prunplanner-preview ready!

Name Link
🔨 Latest commit 8eed176
🔍 Latest deploy log https://app.netlify.com/projects/prunplanner-preview/deploys/697b7cc14d7855000858fb27
😎 Deploy Preview https://deploy-preview-335--prunplanner-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jplacht
Copy link
Copy Markdown
Contributor

jplacht commented Jan 25, 2026

@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!

@cnwangjie
Copy link
Copy Markdown
Contributor Author

@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.

Comment thread src/features/planning/components/PlanProductionRecipe.vue Outdated
@jplacht jplacht linked an issue Jan 27, 2026 that may be closed by this pull request
@jplacht jplacht self-requested a review January 29, 2026 15:29
Copy link
Copy Markdown
Contributor

@jplacht jplacht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jplacht jplacht merged commit 5f72632 into PRUNplanner:main Jan 29, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Allow sorting when selecting a recipe

2 participants