Open KangSeungKu opened 11 months ago
Hi @KangSeungKu . Yes. The solution for your needs is to customize the default wherever you don't want it and disable the defaultOnClick() function. I think you should do these two things:
` const onNameClick = ({ defaultOnClick, nodeData }) => { // defaultOnClick(); ..... };
const FileIcon = ({ onClick: defaultOnClick, nodeData }) => { const { path, name, checked, isOpen, ...restData } = nodeData;
// custom event handler const handleClick = () => { // defaultOnClick(); };
// custom Style return <FaBitcoin onClick={ handleClick } />; };
<FolderTree data={} onChange={onTreeStateChange} iconComponents={{ FileIcon, }} onNameClick={onNameClick} /> `
I hope this solution helps you.
I want to display the toolbar only in the clicked folder, is there a way?
Thank you.