How to use the @bentley/presentation-frontend.FavoritePropertiesManager 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 / test-apps / presentation-test-app / src / frontend / index.tsx View on Github external
const setCustomFavoritePropertiesManager = () => {
  const storage: IFavoritePropertiesStorage = {
    loadProperties: async (_?: string, __?: string) => ({
      nestedContentInfos: new Set(),
      propertyInfos: new Set(),
      baseFieldInfos: new Set(),
    }),
    async saveProperties(_: FavoriteProperties, __?: string, ___?: string) { },
  };
  Presentation.favoriteProperties = new FavoritePropertiesManager({ storage });
};
github imodeljs / imodeljs / presentation / testing / src / Helpers.ts View on Github external
const setCustomFavoritePropertiesManager = () => {
  const storage: IFavoritePropertiesStorage = {
    loadProperties: async (_projectId?: string, _imodelId?: string) => ({
      nestedContentInfos: new Set(),
      propertyInfos: new Set(),
      baseFieldInfos: new Set(),
    }),
    async saveProperties(_properties: FavoriteProperties, _projectId?: string, _imodelId?: string) { },
  };
  PresentationFrontend.favoriteProperties = new FavoritePropertiesManager({ storage });
};