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
{{ message }}
Repository navigation
Wrapping a reactabular row with an HOC/Context #360
Hi,
Is possible to wrap a row with a HOC or Context ?
I would like to implement a table row edit (not cell by cell edit) but i'm unable to use informed or Formik to wrap a reactabular row with a form control logic.
Is there a way to manipulate a row or is the API only allows cell manipulation ?
The thing is that the RowWrapper only receives children.
If props like property and rowData would pass throughה 'TableRow' then a RowWrapper would have the scope that I need.
The bad thing about passing down extra props will be the additional renders on row rather then only render on cells (From what I understand).
@dannyhuly I'm working on a small re-design (separate branch) but I haven't gotten around to finishing it yet as I've been too busy with paid work (I do this one for free so it progresses slowly). Likely finishing that might help in this particular case as it makes the library more flexible.
Activity
[-]Wrapping table a row with an HOC/Context[/-][+]Wrapping a reactabular row with an HOC/Context[/+]bebraw commentedon Oct 17, 2018
Did you notice the
componentsAPI? Technically you can override anything that's in the structure (the component is headless).Could you set up a small example of what you have together so far?
bebraw commentedon Oct 21, 2018
Here are the related docs: https://reactabular.js.org/#/table/overriding-default-renderers .
dannyhuly commentedon Oct 31, 2018
Its looks like using the Table.Provider
renders(specifically the body.row) can help with wrapping theTableRowwith a HOC.The thing is that the
RowWrapperonly receiveschildren.If props like property and rowData would pass throughה 'TableRow' then a
RowWrapperwould have the scope that I need.The bad thing about passing down extra props will be the additional renders on row rather then only render on cells (From what I understand).
Close, but no cigar (yet).
bebraw commentedon Oct 31, 2018
@dannyhuly I'm working on a small re-design (separate branch) but I haven't gotten around to finishing it yet as I've been too busy with paid work (I do this one for free so it progresses slowly). Likely finishing that might help in this particular case as it makes the library more flexible.