Lime Web Components API Documentation - v7.4.0
    Preparing search index...

    Function SelectLimeTypes

    • Decorator that subscribes to limetypes from the LimeTypeRepository.

      This decorator automatically updates the decorated property whenever limetypes change in the platform. Returns an object with all limetypes where the limetype name is used as the key. It's the recommended approach over manual subscriptions as it handles subscription lifecycle automatically.

      Parameters

      Returns PropertyDecorator

      A PropertyDecorator that sets up automatic subscription to limetypes

      Subscribes to: LimeTypeRepository

      Updates: The decorated property with limetypes (Record<string, LimeType>)

      Lifecycle: Automatically subscribes in connectedCallback and unsubscribes in disconnectedCallback

      import { State } from '@stencil/core';
      import { LimeType, SelectLimeTypes } from '@limetech/lime-web-components';

      class MyComponent {
      @State()
      @SelectLimeTypes()
      private limetypes: Record<string, LimeType>;
      }
      import { State } from '@stencil/core';
      import { LimeType, SelectLimeTypes } from '@limetech/lime-web-components';

      class MyComponent {
      @State()
      @SelectLimeTypes({
      map: [(types: Record<string, LimeType>) => types['company']],
      })
      private companyType: LimeType;
      }