lumada-design / hv-uikit-react

UI library for the Next Design System.
https://lumada-design.github.io/uikit/master
Apache License 2.0
39 stars 21 forks source link

Component Table (Lab) toggle disable on checkbox #2804

Open rubenbarroshv opened 2 years ago

rubenbarroshv commented 2 years ago

Latest version

No Hitachi Vantara confidential content

Summary 💡

While using the table component from Lab I was trying to disable some checkboxes depending on a condition. I was able to do this within the creation of the initialState of the table instance.

This is seems like an hack because we initialise the table instance with some props, then we receive the data from the server, and we are updating the initialState, which then recreates/updates the table instance.

Examples 🌈

We could have some property inside the data which would tell the table component to disable the checkbox (like we have on the Table component from Core).

@eliofreitas suggested that we implement a ToggleRowLocked, "replicating" the ToggleRowSelected method.

Motivation 🔦

No response

francisco-guilherme commented 2 years ago

Hi @rubenbarroshv , tks for reaching out.

We'll refine this internally and when prioritised i'll let you know.