Clean way to programmatically set the path of the file manager
Hi,
I am using SfFileManager with flat data and would like to set the current path before opening the dialog that contains the file manager.
Setting the path in the component like this:
<SfFileManager TValue="FileManagerDirectoryContent" Path="@CurrentPath">does not work for my scenario, because the FileManager always navigates back to this path whenever the component re-renders.
What I would like to do instead is set the path directly in code, for example:
if (fileManager != null)
{
fileManager.Path = _myPath;
await fileManager.RefreshFilesAsync();
}This approach works, but it shows a warning indicating that the Path should not be set outside of its component.
Could you please advise on the recommended or clean way to set the path programmatically?
Thanks in advance!
Bruno
Hi Bruno,
Greetings from Syncfusion Support.
Thank you for providing the details regarding your experience with the File Manager component. We have prepared a local sample to replicate the behavior you mentioned. Based on your description, we understand that you are encountering an issue when using the path property, though we would like to clarify the specific symptoms.
In our testing with the path property, we observed that while the File Manager initially navigates to the defined path correctly, selecting a different folder causes the component to open that new folder and then immediately navigate back to the original path defined in the property.
Could you please confirm if this matches the issue you are experiencing. If you are seeing a different behavior, we would appreciate it if you could share a video illustrating the problem. Additionally, please try to reproduce the issue in the attached sample and share a minimal reproducible version with us. This will significantly help us investigate the root cause further.
We have attached the sample used for our local testing. We invite you to review it and let us know your findings.
Please feel free to reach out if you have any additional questions.
Praveen Sellappan
Attachment: sample_777b3294.zip
That’s exactly what I observed in my code as well.
Regards, Bruno
Hi Bruno,
Thank
you for your patience.
Based on the information provided, we have validated and classified the reported scenarios regarding the “FileManager with path property (flat data) reverts to initial path after navigating to another folder” as a bug on our end. The fix for this issue will be included in the upcoming weekly release scheduled for April 14, 2026.
You can track the status of the fix through the following feedback link.
Disclaimer: The provided tentative release timeline is subject to change in the future based on development priorities and testing outcomes.
Regards,
Praveen Sellappan
Hi Bruno,
Thanks for your patience.
We are glad to announce that our weekly patch release 32.1.49 has been rolled out successfully. The issue where “FileManager with path property (flat data) reverts to initial path after navigating to another folder” has been resolved in that release itself.
To access this fix, we suggest you update the package to the latest version(32.1.49) and we have attached the workable sample for your reference.
Sample: Attached as Zip.
Release Note : We will refresh at earliest.
Root Cause: In Flat data mode, the Path parameter from the parent component is continuously re‑applied during every render cycle. OnParametersSetAsync re‑injects the parent’s static Path, causing the FileManager to revert back to the initial folder and breaking selection maintenance.
Regards,
Praveen Sellappan
Attachment: Fsample_8a2b7d9.zip
- 4 Replies
- 2 Participants
-
BR Bruno
- Mar 12, 2026 09:48 AM UTC
- Apr 15, 2026 01:11 PM UTC