toggleLibraryFile()

toggleLibraryFile(id?: string, show?: boolean)

Toggles a concrete file's open/close state.

If the file is currently opened, then it will be closed. And vice versa -> if the file is currently closed, then it will be opened. There is also an optional param to set a concrete target state, but you may use closeLibraryFile() and openLibraryFile() to achieve similar functionality.

//This will toggle the file's open/close state
sambaFrame.toggleLibraryFile('c0771004-c9fc-4308-be4f-6264d8e486af');

//This will open the file, equivalent to sambaFrame.openLibraryFile();
sambaFrame.toggleLibraryFile('c0771004-c9fc-4308-be4f-6264d8e486af', true); 

//This will close the file, equivalent to sambaFrame.closeLibraryFile();
sambaFrame.toggleLibraryFile('c0771004-c9fc-4308-be4f-6264d8e486af', false);

Sample use case: You may have buttons in your integration to control file opening and closing.

Last updated