We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using the following versions :-
I have used it as follows :-
const FileExplorerTheme = dynamic(() => import("react-sortable-tree-theme-file-explorer"), { ssr: false }); <SortableTree treeData={treeData} onChange={handleChange} onMoveNode={handleMove} theme={FileExplorerTheme} />
I am getting following warning and the theme is not getting applied:-
Warning: Failed prop type: Invalid prop `theme` of type `function` supplied to `ReactSortableTree`, expected `object`.
The text was updated successfully, but these errors were encountered:
This is because dynamic import are only supported for React components (vercel/next.js#13417) but FileExplorerTheme is an object.
To solve this, const [fileTheme, setFileTheme] = useState(null); useEffect(() => { (function importSortableTree() { import('react-sortable-tree-theme-file-explorer').then((obj) => { setFileTheme(obj.default); }) })(); }, [])
And use the fileTheme object
Sorry, something went wrong.
No branches or pull requests
I am using the following versions :-
I have used it as follows :-
I am getting following warning and the theme is not getting applied:-
The text was updated successfully, but these errors were encountered: