Open danksch opened 5 years ago
Maybe try passing in a blank renderer (have it return nothing in its render method)?
Also could you describe your use case a little for us (just curious)?
Hi
I have the same question, in my case the user doesn't have the need of the item details
since the table already contains all that the user needs.
how can I pass the blank renderer? is there any example?
Hi I have the same question, in my case the user doesn't have the need of the
item details
since the table already contains all that the user needs.how can I pass the blank renderer? is there any example?
Answering my own question, just created a new Class which had the render()
return what I wanted, either nothing or something that the users in my project would need and passed it as:
<FileBrowser
...
detailRenderer={MyRenderer}
...
/>
the class is something like this:
class MyRenderer extends React.Component {
constructor(props) {
super(props)
}
render() {
return (
<div>
<p>something</p>
</div>
);
}
}
export default MyRenderer;
Neat. I'll leave this open, as we'd probs like to offer a neater way of doing this in future.
Also could you describe your use case a little for us (just curious)?
I'm trying to implement a file browser with drag and drop functionality, where a user selects files/folders on a drive.
Maybe try passing in a blank renderer (have it return nothing in its render method)?
Yes, that's what I've one for now. Similar to @DarioDiem 's approach, I just passed a (functional) component which returns nothing:
`function EmptyRenderer() { return (
)
}`
Well, this works:
detailRenderer={() => null}
I think this issue should be closed
Closing due to suitable solutions above
I tried disabling the detailRenderer by setting
detailRenderer={null}
, which is an unexpected type and doesn't work. In the tutorial, I sawheaderRenderer
set tonull
once and thought this would work here as well.How can I disable the item details ?