clearSelection();
The clearSelection method removes selection in a basic dialog box 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 basic dialog box 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:
// Deselect all selections in dialog box metabaseDialogBase.clearSelection(); // Determine new values of dialog box width and height var width = 120; var height = 100; // Change dialog box sizes PP.Navigator.MetabaseDialogBase.base.setWidth.call(metabaseDialogBase, width); PP.Navigator.MetabaseDialogBase.base.setHeight.call(metabaseDialogBase, height); metabaseDialogBase.recalcSize(width, height + 200); // Collapse the dialog box contents in order to correspond 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: