nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
20.73k stars 1.28k forks source link

[Feature Request] In table component custom checkbox component. #2572

Open Rutvikraj-Paroscale opened 3 months ago

Rutvikraj-Paroscale commented 3 months ago

Is your feature request related to a problem? Please describe.

Current NextUI provides default checkbox component in its table component. In my project we use a custom checkbox component.

Describe the solution you'd like

NextUI has a feature to use a custom checkbox component as a standalone component. Can it be used to integrate a custom checkbox component in table ?

Describe alternatives you've considered

We are currently adding a new column to display our custom checkbox.

Screenshots or Videos

No response

linear[bot] commented 3 months ago

ENG-551 [Feature Request] In table component custom checkbox component.

KelvinDiasMoreira commented 3 months ago

Yes, you can. Here is the example: https://nextui.org/docs/components/table#custom-cells.

const renderCell = React.useCallback((user, columnKey) => { if(columnKey === "yourColunm") return ( <YourComponent/> ) }

is that what you need ?

Rutvikraj-Paroscale commented 3 months ago

Hi Kelvin,

Thanks for the suggestion. That could work but then we might not be able to use the in-built selection functionality? We might have to create a selection functionality of our own. Please correct me if I'm wrong.

Thank you, Rutvikrajsinh Champavat

On Tue, Mar 26, 2024 at 7:27 AM Kelvin @.***> wrote:

Yes, you can. Here is the example: https://nextui.org/docs/components/table#custom-cells.

const renderCell = React.useCallback((user, columnKey) => { if(columnKey === "yourColunm") return ( ) }

is that what you need ?

— Reply to this email directly, view it on GitHub https://github.com/nextui-org/nextui/issues/2572#issuecomment-2019247530, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFTLETFC74KWIWWGIPXMQGLY2DI2DAVCNFSM6AAAAABFEMOLQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJZGI2DONJTGA . You are receiving this because you authored the thread.Message ID: @.***>

KelvinDiasMoreira commented 3 months ago

Yes, I think that you will need create a custom functionality.

Rutvikraj-Paroscale commented 3 months ago

I wanted to use the in-built selection functionality but with a custom checkbox component because creating our own selection functionality may not be as performant as the in-built one.

Thank you, Rutvikrajsinh Champavat

On Wed, Mar 27, 2024 at 6:30 AM Kelvin @.***> wrote:

Yes, I think that you will need create a custom functionality.

— Reply to this email directly, view it on GitHub https://github.com/nextui-org/nextui/issues/2572#issuecomment-2021735697, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFTLETAB6IXXGQFFJLJVSLTY2IK4NAVCNFSM6AAAAABFEMOLQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRRG4ZTKNRZG4 . You are receiving this because you authored the thread.Message ID: @.***>