Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-table] refCallback is not working #2893

Closed
TechFreaky opened this issue Mar 6, 2020 · 0 comments · Fixed by #2901
Closed

[terra-table] refCallback is not working #2893

TechFreaky opened this issue Mar 6, 2020 · 0 comments · Fixed by #2901
Assignees
Milestone

Comments

@TechFreaky
Copy link

Bug Report

Description

refCallback is not returning the ref of the table row.
It may be because the refCallback prop is not sent while creating rows here:

.

Steps to Reproduce

Add refCallback prop while creating rows and provide a callback function which is not getting triggered even after the component is mounted.

Additional Context / Sample Code

const createRow = (tableType, rowData, index, selectedRowIndex, handleRowDisclose, refCallBackFunc, intl) => ({
key: ${tableType}AlertRow-${index},
cells: createCellsForRow(tableType, rowData, ${tableType}AlertRow-${index}, intl),
isStriped: index % 2 !== 0,
refCallback: ref => refCallBackFunc(ref, index),
discloseAction: {
metaData: { key: index, content: rowData },
onDisclose: handleRowDisclose,
isDisclosed: selectedRowIndex === index,
discloseLabel: ${tableType}AlertRow-${index}-disclose-label,
discloseCellIndex: index,
},
});

Expected Behavior

ref should be returned.

Possible Solution

Environment

  • Component Name and Version: terra-table@4.3.0
  • Browser Name and Version: Chrome, latest
  • Node/npm Version: Node 10.16.0, npm 6.9.0
  • Webpack Version: 4.42.0
  • Operating System and version (desktop or mobile): Windows

@ Mentions

MR, Supreeth

@StephenEsser StephenEsser changed the title refCallback is not working in terra-table [terra-table] refCallback is not working Mar 6, 2020
@ryanthemanuel ryanthemanuel added this to the Backlog milestone Mar 9, 2020
@supreethmr supreethmr self-assigned this Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants