Hello,
Filemanagercomponent should support refto access its API, as shown in our documentation. However, there’s currently a type definition inconsistency that prevents reffrom being recognized properly in TypeScript projects.
It will be fixed in one of the upcoming releases.
You can access the FilemanagerAPI via a React ref. The component exposes its API object through the refprop. For example:
const apiRef = useRef<IApi>(null);
// Later, call API methods like:
apiRef.current?.exec('provide-data', {
id: '/Code',
data: serializedData,
});
Please check the example: https://stackblitz.com/edit/vitejs-vite-xkgczzyv?file=src%2FApp.tsx
Or you can apply the init handler.