clearSelection();
The clearSelection method removes selection in a base dialog with repository.
To execute the example, the HTML page must contain the MetabaseDialogBase component named metabaseDialogBase (see Example of creating the MetabaseDialogBase component). Manually select an object in the base dialog with repository. For example, select a folder as it is shown in the figure below:
Now clear all selections in the dialog box, and make the dialog box smaller:
// Clear all selection in the dialog metabaseDialogBase.clearSelection(); // Determine new values of dialog width and height var width = 120; var height = 100; // Resize the dialog PP.Ui.MetabaseDialogBase.base.setWidth.call(metabaseDialogBase, width); PP.Ui.MetabaseDialogBase.base.setHeight.call(metabaseDialogBase, height); metabaseDialogBase.recalcSize(width, height + 200); // Expand the dialog contents to fit the container size metabaseDialogBase.setCollapsed(False);
After executing the example all selections in the dialog box are cleared, dialog box width is set to 120 pixels, and width to 100 pixels. To fit the dialog box content to container size, the content is expanded:
See also: