How to use the @ui5/webcomponents-react-base.Event.of function in @ui5/webcomponents-react-base

To help you get started, we’ve selected a few @ui5/webcomponents-react-base 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 SAP / ui5-webcomponents-react / packages / main / src / components / ObjectPage / ObjectPageAnchor.tsx View on Github external
private handleAnchorButtonClick = (e) => {
    const isIconClicked = !e.getParameter('text');
    const { section, onAnchorSelected } = this.props;
    if (isIconClicked) {
      this.openModal();
    } else if (onAnchorSelected) {
      onAnchorSelected(Event.of(this, e.getOriginalEvent(), section));
    }
  };
github SAP / ui5-webcomponents-react / packages / main / src / components / ObjectPage / ObjectPageAnchor.tsx View on Github external
private onSubSectionClick = (e) => {
    const { section, onSubSectionSelected } = this.props;
    const selectedId = e.getParameter('item').dataset.key;
    const subSection = section.props.children
      .filter((item) => item.props && item.props.isSubSection)
      .find((item) => item.props.id === selectedId);
    if (this.state.open && subSection) {
      onSubSectionSelected(Event.of(this, e.getOriginalEvent(), subSection));
    }
    this.closeModal();
  };