ActiveUI

ActiveUI

  • User Guide
  • Developer Documentation

Home > @activeviam/activeui-sdk > SelectedRootDockAware

SelectedRootDockAware() function

A Function As Child Component that provides the API of the root dock holding the widget that is currently selected to child components. See SelectedWidgetAware() for more details.

Signature:

export declare function SelectedRootDockAware(props: SelectedRootDockAwareProps): JSX.Element;

Parameters

ParameterTypeDescription
propsSelectedRootDockAwareProps

Returns:

JSX.Element

Example

// Custom button for undoing the last change on a dashboard.
const UndoButton = () => (
 <SelectedRootDockAware>
   {selectedRootDockApi => (
     <Button
       disabled={!selectedRootDockApi.hasPreviousState()}
       onClick={() => {
         selectedRootDockApi.undo();
       }}
     >
       Undo
     </Button>
   )}
 </SelectedRootDockAware>
);

  • SelectedRootDockAware() function
  • Parameters
  • Example
Copyright © 2023 ActiveViam