/*
 * Copyright (C) 2019 Robert Bosch GmbH Copyright (C) 2019 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { Component } from '@angular/core';

import { fruits } from '../picklist-demo-model';

/** This demo shows how to use a property name to display the picklist items. */
@Component({
  selector: 'bci-custom-item-templates',
  templateUrl: './custom-item-templates.component.html',
  styleUrls: ['./custom-item-templates.component.scss'],
})
export class CustomItemTemplatesComponent {
  fruits = fruits;

  /**
   * Display property name of objects in list of fruits. Note that the display property will be ignored if a custom item template is set.
   * However, setting the source item template will not set the target item template because the item lists do not share templates.
   */
  displayProperty = 'name';
}
