Hey Community,
I'm looking to access the `onclick` / 'FolderTreeVisibleChanged' handler of the Folders button on Freedom UI list pages. What is the name of the handler method that i can use?
Like
Hello sprity,
If i understood you correctly, you want to control visibility state or togle mode of the folders tree. The handler you provided, well, is responsible for this logic.
Here is an example of how you can do it:
Toggle mode (open if closed, close if open):
{
request: 'crt.FolderTreeVisibleRequest',
params: {
folderTreeName: "FolderTree_blabla",
togglePanel: true
}
}
Explicit visibility mode (always open or always close, regardless of current state):
{
request: 'crt.FolderTreeVisibleRequest',
params: {
folderTreeName: "FolderTree_blabla",
visible: true // or false to close
}
}
As mentioned, this handler also saves the state to the user profile, meaning that when the page is reopened, the folder tree will be in the same state (open or closed) as it was before. If you'd prefer not to save the state in the profile, you can manually update the visibility attribute, like so:
{folder tree name}_visible => FolderTree_blabla_visible
Hope this helps! Let me know if i understood you correctly and if you have any questions let.
Hello sprity,
If i understood you correctly, you want to control visibility state or togle mode of the folders tree. The handler you provided, well, is responsible for this logic.
Here is an example of how you can do it:
Toggle mode (open if closed, close if open):
{
request: 'crt.FolderTreeVisibleRequest',
params: {
folderTreeName: "FolderTree_blabla",
togglePanel: true
}
}
Explicit visibility mode (always open or always close, regardless of current state):
{
request: 'crt.FolderTreeVisibleRequest',
params: {
folderTreeName: "FolderTree_blabla",
visible: true // or false to close
}
}
As mentioned, this handler also saves the state to the user profile, meaning that when the page is reopened, the folder tree will be in the same state (open or closed) as it was before. If you'd prefer not to save the state in the profile, you can manually update the visibility attribute, like so:
{folder tree name}_visible => FolderTree_blabla_visible
Hope this helps! Let me know if i understood you correctly and if you have any questions let.
Yevhenii Grytsiuk,
Thank you for this Yevhenii. One of the more difficult parts of working with Freedom UI is the inability to dig into the out of the box code to see how to change the behavior. This was easy with classic, but for Freedom we have to dig through all the minified code to see if we get lucky finding what we are after.
Until there's better documentation outlining what all the various requests are to handle, it would be great to have some sort of switch (like the IsDebug setting to enable debug mode) that just dumps all the fired requests to the console (and maybe include what object/component fired the request?) Not sure how reasonable that would be since it's likely quite a bit of stuff would show there, but might make it easier to see the requests that fire when some action is taken.
Ryan
Ryan Farley,
Sounds great to me. I will register your idea so that our r&d team hopefully would implement it.