How to use the @patternfly/react-core.DropdownPosition.right function in @patternfly/react-core

To help you get started, we’ve selected a few @patternfly/react-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github patternfly / patternfly-react / packages / patternfly-4 / react-table / src / components / Table / Table.tsx View on Github external
export const TableContext = React.createContext({
  headerData: null as ColumnsType,
  headerRows: null as IHeaderRow[],
  rows: [] as (IRow | string[])[]
});

class Table extends React.Component {
  static defaultProps = {
    children: null as React.ReactNode,
    className: '',
    variant: null as TableVariant,
    borders: true,
    rowLabeledBy: 'simple-node',
    expandId: 'expandable-toggle',
    contentId: 'expanded-content',
    dropdownPosition: DropdownPosition.right,
    dropdownDirection: DropdownDirection.down,
    header: undefined as React.ReactNode,
    caption: undefined as React.ReactNode,
    'aria-label': undefined as string,
    gridBreakPoint: TableGridBreakpoint.gridMd,
    role: 'grid',
    canSelectAll: true
  };

  isSelected = (row: IRow) => row.selected === true;

  areAllRowsSelected = (rows: IRow[]) => {
    if (rows === undefined || rows.length === 0) {
      return false;
    }
    return rows.every(row => this.isSelected(row) || (row.hasOwnProperty('parent') && !row.showSelect));
github ansible / awx / awx / ui_next / src / screens / Template / TemplateList / TemplateAddButton.jsx View on Github external
}
  };

  useEffect(() => {
    document.addEventListener('click', toggle, false);
    return () => {
      document.removeEventListener('click', toggle);
    };
  }, []);

  return (
    <div>
       setIsOpen(!isOpen)} /&gt;}
        dropdownItems={[
          
            {i18n._(t`Job Template`)}
          ,
          
            {i18n._(t`Workflow Template`)}
          ,</div>
github fusor / mig-ui / src / app / home / components / DataList / Plans / PlanActions.tsx View on Github external
&gt;
      Logs
    ,
  ];

  return (
    <div>
      <div>
         setKebabIsOpen(!kebabIsOpen)}
          /&gt;}
          isOpen={kebabIsOpen}
          isPlain
          dropdownItems={kebabDropdownItems}
          position={DropdownPosition.right}
        /&gt;
        
      </div>
    </div>
  );
};
github kiegroup / optaweb-vehicle-routing / optaweb-vehicle-routing-frontend / src / ui / components / DemoDropdown.tsx View on Github external
export const DemoDropdown: React.FC = ({ demos, onSelect }) =&gt; {
  const [isOpen, setOpen] = React.useState(false);
  return (
     {
        setOpen(false);
        onSelect(e.currentTarget.innerText);
      }}
      toggle={(
         setOpen(!isOpen)}
        &gt;
          Load demo...
        
      )}
    /&gt;
  );
github syndesisio / syndesis / app / ui-react / packages / ui / src / Connection / ConnectionCard.tsx View on Github external
) : (
                      <a tabindex="{3}" role="{'menuitem'}" href="{'javascript:void(0)'}" data-testid="{'connection-card-delete-action'}">
                        {this.props.menuProps.i18nDeleteLabel}
                      </a>
                    )}
                  ,
                ]}
                position={DropdownPosition.right}
              /&gt;
            
          )}
          
            
              <div>
                <div>{this.props.icon}</div>
                <title data-testid="{'connection-card-title'}" size="lg"></title></div>
github ansible / awx / src / components / HelpDropdown.jsx View on Github external
About
      
    ];

    return (
      
         this.setState({ isOpen: !isOpen })}
          toggle={(
             this.setState({ isOpen: isToggleOpen })}&gt;
              
            
          )}
          isOpen={isOpen}
          dropdownItems={dropdownItems}
          position={DropdownPosition.right}
        /&gt;
        {showAboutModal
          ? (
             this.setState({ showAboutModal: !showAboutModal })}
            /&gt;
          )
          : null }
      
    );
  }
}
github kiali / kiali-ui / src / components / IstioWizards / IstioWizardDropdown.tsx View on Github external
render() {
    const hasActionRights = this.canCreate() || this.canUpdate() || this.canDelete();
    const hasSidecarWorkloads = this.hasSidecarWorkloads();
    const toolTipMsgActions = !hasActionRights
      ? 'User has not permissions on this Service'
      : !hasSidecarWorkloads
      ? 'There are not Workloads with sidecar for this service'
      : 'There are not Workloads with ' + this.appLabelName + ' and ' + this.versionLabelName + ' labels';
    const validWorkloads = this.getValidWorkloads();
    const validActions = hasActionRights &amp;&amp; hasSidecarWorkloads &amp;&amp; validWorkloads;

    const dropdown = (
      
            Actions
          
        }
        isOpen={this.state.isActionsOpen}
        dropdownItems={this.renderDropdownItems()}
        disabled={!validActions}
        style={{ pointerEvents: validActions ? 'auto' : 'none' }}
      /&gt;
    );
    return (
      &lt;&gt;
        {!hasActionRights || !hasSidecarWorkloads
          ? this.renderTooltip('tooltip_wizard_actions', TooltipPosition.top, toolTipMsgActions, dropdown)
github fusor / mig-ui / src / app / home / components / DataList / Clusters / ClusterItem.tsx View on Github external
]}
        /&gt;,
        
           setKebabIsOpen(!kebabIsOpen)}
            /&gt;}
            isOpen={kebabIsOpen}
            isPlain
            dropdownItems={kebabDropdownItems}
            position={DropdownPosition.right}
          /&gt;

          
          
        ,
      
github patternfly / patternfly-react / packages / patternfly-4 / react-table / src / components / Table / Table.js View on Github external
onExpand: null,
  className: '',
  variant: null,
  borders: true,
  sortBy: undefined,
  onSelect: undefined,
  onSort: undefined,
  actions: undefined,
  actionResolver: undefined,
  areActionsDisabled: undefined,
  bodyWrapper: undefined,
  rowWrapper: undefined,
  rowLabeledBy: 'simple-node',
  expandId: 'expandable-toggle',
  contentId: 'expanded-content',
  dropdownPosition: DropdownPosition.right,
  dropdownDirection: DropdownDirection.down,
  header: undefined,
  caption: undefined,
  'aria-label': undefined,
  gridBreakPoint: TableGridBreakpoint.gridMd,
  role: 'grid'
};

export const TableContext = React.createContext();

class Table extends React.Component {
  isSelected = row => row.selected === true;

  areAllRowsSelected = rows => {
    if (rows === undefined || rows.length === 0) {
      return false;
github ansible / awx / awx / ui_next / src / screens / Template / TemplateList / TemplateList.jsx View on Github external
onSelect={() =&gt; this.handleSelect(template)}
                isSelected={selected.some(row =&gt; row.id === template.id)}
              /&gt;
            )}
            emptyStateControls={
              canAdd &amp;&amp; (
                <div> {
                    this.node = node;
                  }}
                  key="add"
                &gt;
                  }
                    dropdownItems={[
                      
                        
                          {i18n._(t`Job Template`)}
                        
                      ,
                      
                        
                          {i18n._(t`Workflow Template`)}
                        
                      ,
                    ]}
                  /&gt;
                </div>
              )