Tabs and nested Data Grids to represent event versions within the Data Grid component #3539
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Hello! Based on the Paste documentation, it's possible to use Tabs in combination with a Data Grid to represent different versions of table data. You can use the Here's a basic example of how you might structure this: import {Tabs, TabList, Tab, TabPanels, TabPanel} from '@twilio-paste/core/tabs';
import {DataGrid, DataGridHead, DataGridRow, DataGridHeader, DataGridBody, DataGridCell} from '@twilio-paste/core/data-grid';
<Tabs>
<TabList>
<Tab>Version 1</Tab>
<Tab>Version 2</Tab>
</TabList>
<TabPanels>
<TabPanel>
<DataGrid>
{/* Your Version 1 Data Grid goes here */}
</DataGrid>
</TabPanel>
<TabPanel>
<DataGrid>
{/* Your Version 2 Data Grid goes here */}
</DataGrid>
</TabPanel>
</TabPanels>
</Tabs> In this example, each Remember, the content in each As for nested grids, the Paste documentation does mention that a Grid can be nested inside another Grid. However, it doesn't explicitly mention nesting a Data Grid within another Data Grid. If you're considering this approach, I would recommend testing thoroughly to ensure it meets your needs and provides a good user experience. I hope this helps! Let me know if you have any other questions. Here are some similar discussions:
|
Beta Was this translation helpful? Give feedback.
-
Hey @mschasz ! Can you discuss moving forward with this with Caroline? I just chatted with Kelly + @ceyerkes, and this is a case where this existing element in Segment should be restyled to look like Paste in the interim, until there's more designer capacity to rework this experience. As far as I know, it's not an Evergreen component, but let me know if that's not true. This isn't functionality we necessarily want to build into the Paste Data Grid component because it'll overload Data Grid with another navigation/hierarchy layer. To migrate this to Paste in the long-term, you'll want to work with Caroline or a Protocols designer since it's not going to be a 1:1 component swap. |
Beta Was this translation helpful? Give feedback.
Overall, I'm not super confident that the existing layout's the best experience to begin with, so definitely rely more on Caroline and the other Segment designers to work through this.
But if you absolutely need a workaround in Paste, you can use Paste bot's example—it just can't then be nested inside another Data Grid.