fix: Keep state in dataroom view between document and dataroom view #783
Bug: The folderId state is getting resetted everytime when we changing the view.
Fix: I lifted the state of folderId in DataroomViewer component to DataroomView component.
@Nithin-532 is attempting to deploy a commit to the mftsio Team on Vercel.
A member of the Team first needs to authorize it.
All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.
PR Summary
-
Enhanced DataroomViewer Component We've upgraded our DataroomViewer component's functionality, allowing it to accept additional information (
folderIdandsetFolderId) directly from its surrounding environment. -
Simplified State Management We removed the local state initiation for
folderIdandsetFolderId. These pieces of data are now received as parameters, enhancing flexibility and control over component behavior. -
Improved DataroomView Component We introduced local state management for
folderIdandsetFolderIdwithin the DataroomView component, providing it with the ability to manage these data in its scope. -
Enhanced Data Flow to Child Components We've improved how we distribute information to component's offspring. The
folderIdandsetFolderIdare now transferred to the relevant child components within theDataroomView, improving hierarchy operation and data accessibility.
I have read the CLA Document and I hereby sign the CLA
recheck
@Nithin-532 great job! it's such a simple change.
One small request and probably that might take some fiddling around but even tho the folder state is preserved, for some reason the folder tree doesn't expand to the current folder automatically
Could you test this with a deeply-nested file (i.e. 2 or more folders deep) and see if you can fix the issue :)
https://github.com/user-attachments/assets/4ca4f448-486e-46e3-864e-e8888d76b51a
@mfts sure
@mfts I somewhat solved the problem. Here is the video.
Screencast from 14-10-24 05:57:38 PM IST.webm
But I think this is not an optimal approach. I nested through all the folders and children of those folders to find the path of the folderId that has been selected.
But I think this is not an optimal approach. I nested through all the folders and children of those folders to find the path of the folderId that has been selected.
@Nithin-532 I see. let me know if you want me to review some part of the code