You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our use case, this is impossible because we fetch data at a later time in paginations. So as we render the Datagrid, we want it to be in loading state and then as data comes in, we will start adding rows to the Datagrid. Because of this, we will never have enough data / info to populate the initial state we want.
Secondly, the initial state currently seems to be based on the actual row IDs, which is generated by Datagrid. There is no way for us to know the actual row ID ahead of time before we render the Datagrid table.
We would like to have a few enhancements and behaviour change:
One of our other use cases is that after doing certain actions from Datagrid table, we will create a new nested row, which we want it to be expanded by default. Today, we have no such way to do so. Therefore we would like to have a way to specify an initialState for this new row to tell Datagrid to expand or select it at re-render time. After rendering with the new row(s), the initialState should be thrown away and let the users to manage the states afterward.
We would like the initialState to use the id in the data array instead. This is the ID we know ahead. So Datagrid should use the data.id whenever possible and then fallback to the actual row id if it is missing.
We want a way to specify the initialState of multiple rows as they being injected to the table. This is similar to (1), so if (1) is solved, I believe this will be solved as well.
Today, the initialState only deals with expansion state, it will be good if it can also deal with selection state.
@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version
1.72.2
Severity
Severity 2 = Aspects of design is broken, and impedes users in a significant way, but there is a way to complete their tasks. Affects major functionality, has a workaround.
Package
Carbon for IBM Products
Description
Based on https://carbon-for-ibm-products.netlify.app/?path=/docs/ibm-products-components-datagrid-nestedrows--docs#with-initially-expanded-nested-rows, there is currently a way to specify the initial expansion state for nested rows. However, this requires the data or rows to be ALL available before very first time rendering the Datagrid.
In our use case, this is impossible because we fetch data at a later time in paginations. So as we render the Datagrid, we want it to be in loading state and then as data comes in, we will start adding rows to the Datagrid. Because of this, we will never have enough data / info to populate the initial state we want.
Secondly, the initial state currently seems to be based on the actual row IDs, which is generated by Datagrid. There is no way for us to know the actual row ID ahead of time before we render the Datagrid table.
We would like to have a few enhancements and behaviour change:
initialState
for this new row to tell Datagrid to expand or select it at re-render time. After rendering with the new row(s), theinitialState
should be thrown away and let the users to manage the states afterward.initialState
to use theid
in thedata
array instead. This is the ID we know ahead. So Datagrid should use thedata.id
whenever possible and then fallback to the actual row id if it is missing.initialState
of multiple rows as they being injected to the table. This is similar to (1), so if (1) is solved, I believe this will be solved as well.initialState
only deals with expansion state, it will be good if it can also deal with selection state.Component(s) impacted
IBM Projects UI: https://cloud.ibm.com/projects
Browser
Chrome, Safari, Firefox, Microsoft Edge
@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version
1.72.2
Severity
Severity 2 = Aspects of design is broken, and impedes users in a significant way, but there is a way to complete their tasks. Affects major functionality, has a workaround.
Product/offering
IBM Cloud Projects
CodeSandbox or Stackblitz example
N/A
Steps to reproduce the issue (if applicable)
No response
Release date (if applicable)
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: