-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
n-data-table
slot for row or component for column
#5065
Comments
It seems that the official team is not planning to do this work. 😭 I created a project @skit/x.naive-ui based on Naive-UI, enables to use For example like this: <x-n-data-table :data="data">
<x-n-data-table-column type="selection" />
<x-n-data-table-column key="name" title="Name" />
<x-n-data-table-column key="age" title="Age" />
<x-n-data-table-column key="address" title="Address" />
</x-n-data-table> |
duplicate #4273 |
@fudiwei thank! Appreciate translate to english. |
@jahnli didn't know abotu that issues, since i'm not chinese speaker. Thanks. |
There is a community that has created a Naive UI based project @skit/x.naive-uiDataTable that can be used in template styles. |
This function solves the problem (这个功能解决的问题)
Hi, i feel a bit frustrating with working on datatable.
My issue is i often need custom render for columns, and doing layout via
h
function is a bit pain.Expected API (期望的 API)
I see two ways there:
We can create new component called
n-data-table-column
for usage in vue<template>
. In that case it should take column name from property for example calledcolumn="name"
.If we not create
n-data-table-column
for other columns, they use default render from:columns
property ofn-data-table
Also this issue can be done via fully custom row customization, so we have component
n-data-table-row
, but in that case we should write all columns render here, which is might be overhead.The text was updated successfully, but these errors were encountered: