Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaterialTable.detailPanel should work via func and object (aka { render: foo }) #72

Closed
oze4 opened this issue Jan 17, 2021 · 1 comment
Assignees
Labels
bug Something isn't working in-progress For ideas/possible enhancements/discussions

Comments

@oze4
Copy link
Member

oze4 commented Jan 17, 2021

Per #70 (comment)

@pbr0ck3r


I was getting this issue after upgrading to 2.3.7 when I built my code for production and it was live, but running locally not it ran just fine did not show any errors.

const details = (rowData) => {
     <span>bob</span>
}
<MaterialTable
        columns={columns}
        data={data}
        title=""
        detailPanel={details}
        options={options}
        onRowClick={(event, rowData, togglePanel) => {
          togglePanel(rowData.tableData.id);
        }}
      />

Once I added the render in the detailPanel it worked just fine before build and after. Would be nice to throw a error if you are forgetting to pass in render. Code after looked like this:

<MaterialTable
        columns={columns}
        data={data}
        title=""
        detailPanel={[{ render: details }]}
        options={options}
        onRowClick={(event, rowData, togglePanel) => {
          togglePanel(rowData.tableData.id);
        }}
      />
@oze4 oze4 added the bug Something isn't working label Jan 17, 2021
@oze4 oze4 self-assigned this Jan 17, 2021
@oze4 oze4 added the in-progress For ideas/possible enhancements/discussions label Jan 17, 2021
@oze4
Copy link
Member Author

oze4 commented Jan 17, 2021

Looks to be resolved in 2.3.7

@oze4 oze4 closed this as completed Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in-progress For ideas/possible enhancements/discussions
Projects
None yet
Development

No branches or pull requests

1 participant