How to use the @bentley/presentation-frontend.SelectionHandler function in @bentley/presentation-frontend

To help you get started, we’ve selected a few @bentley/presentation-frontend 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 imodeljs / imodeljs / presentation / components / src / viewport / WithUnifiedSelection.tsx View on Github external
public constructor(imodel: IModelConnection) {
    this._imodel = imodel;

    // handles changing and listening to unified selection
    this._selectionHandler = new SelectionHandler(Presentation.selection,
      `Viewport_${counter++}`, imodel, undefined, this.onUnifiedSelectionChanged);
    this._selectionHandler.manager.setSyncWithIModelToolSelection(imodel, true);

    // stop imodel from syncing tool selection with hilited list - we want
    // to override that behavior
    imodel.hilited.wantSyncWithSelectionSet = false;
  }
github imodeljs / imodeljs / presentation / components / src / tree / controlled / UseUnifiedSelection.ts View on Github external
  const unifiedSelectionHandler = useRefLazy(() => new SelectionHandler(Presentation.selection, name, dataProvider.imodel, dataProvider.rulesetId));
github imodeljs / imodeljs / presentation / components / src / propertygrid / WithUnifiedSelection.tsx View on Github external
public componentDidMount() {
      const name = `PropertyGrid_${counter++}`;
      const imodel = this.props.dataProvider.imodel;
      const rulesetId = this.props.dataProvider.rulesetId;
      this._isMounted = true;
      this._selectionHandler = this.props.selectionHandler
        ? this.props.selectionHandler : new SelectionHandler(Presentation.selection, name, imodel, rulesetId);
      this._selectionHandler!.onSelect = this.onSelectionChanged;
      this.updateDataProviderSelection();
    }
github imodeljs / imodeljs / presentation / components / src / table / WithUnifiedSelection.tsx View on Github external
public componentDidMount() {
      const name = `Table_${counter++}`;
      const imodel = this.props.dataProvider.imodel;
      const rulesetId = this.props.dataProvider.rulesetId;
      this._selectionHandler = this.props.selectionHandler
        ? this.props.selectionHandler : new SelectionHandler(Presentation.selection, name, imodel, rulesetId);
      this._selectionHandler!.onSelect = this.onSelectionChanged;
      this.displaySelection();
    }
github imodeljs / imodeljs / presentation / components / src / tree / WithUnifiedSelection.tsx View on Github external
public componentDidMount() {
      const name = `Tree_${counter++}`;
      const imodel = this.props.dataProvider.imodel;
      const rulesetId = this.props.dataProvider.rulesetId;
      this._selectionHandler = this.props.selectionHandler
        ? this.props.selectionHandler : new SelectionHandler(Presentation.selection, name, imodel, rulesetId);
      this._selectionHandler!.onSelect = this.onSelectionChanged;
    }