question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pass views as children to Datatable.Cell

See original GitHub issue

Feature Description

I’d like to have the ability to pass custom views as children to be displayed within the Datatable.Cell as such:

<DataTable.Cell >
    <View style={styles.actionCell}>
        <IconButton
              icon="delete"
              color={Colors.red500}
              size={20}
              onPress={() => console.log('Pressed')}
        />
        <IconButton
              icon="edit"
              color={Colors.grey400}
              size={20}
              onPress={() => console.log('Pressed')}
        />
    </View>
</DataTable.Cell>

Motivation

The reason is, as the example above shows, I need to have quick actions available for the rows in the table.

Thank you for your efforts!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

17reactions
satya164commented, May 1, 2019

Just render a view. You don’t need to wrap it in DataTable.Cell

3reactions
yousseftarekcommented, May 1, 2019

That works just fine! Thank You so much! (Sorry, I wasn’t paying attention)

Read more comments on GitHub >

github_iconTop Results From Across the Web

row().child() - DataTables
DataTables has the ability to show child rows for each row (termed a "parent row" in this documentation to distinguish from the child...
Read more >
Passing An Array To Datatable Child Row - Stack Overflow
I'm passing them all through one array, in the Child Row, I am calling the data from the array index and then assign...
Read more >
Find Children and assigning to a Second Data Table - Studio
Find Children and assigning to a Second Data Table · Opens Excel · Writes Sheet1 to DataTable1 · Writes Sheet2 to DataTable2 ·...
Read more >
Pass DataTable Selected Row from Parent to child Record Page
this.recordId = selectedRows[0].Id;. This should be all the changes you need to make. Share.
Read more >
DataTable Class (System.Data) - Microsoft Learn
DataTable table = new DataTable("childTable"); DataColumn column; DataRow row; ... DataRelation requires two DataColumn // (parent and child) and a name.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found