How to use the ember-bootstrap/utils/cp/listen-to function in ember-bootstrap

To help you get started, we’ve selected a few ember-bootstrap 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 kaliber5 / ember-bootstrap / addon / components / base / bs-accordion.js View on Github external
selected = null;

  /**
   * @property itemComponent
   * @type {String}
   * @private
   */
  itemComponent = 'bs-accordion/item';

  /**
   * The value of the currently selected accordion item
   *
   * @property isSelected
   * @private
   */
  @listenTo('selected')
  isSelected;

  /**
   * Action when the selected accordion item is about to be changed.
   *
   * You can return false to prevent changing the active item, and do that in your action by
   * setting the `selected` accordingly.
   *
   * @event onChange
   * @param newValue
   * @param oldValue
   * @public
   */
  onChange(newValue, oldValue) {} // eslint-disable-line no-unused-vars

  @action
github kaliber5 / ember-bootstrap / addon / components / base / bs-navbar.js View on Github external
/**
   * Manages the state for the responsive menu between the toggle and the content.
   *
   * @property collapsed
   * @type boolean
   * @default true
   * @public
   */
  @defaultValue
  collapsed = true;

  /**
   * @property _collapsed
   * @private
   */
  @listenTo('collapsed')
  _collapsed;

  /**
   * Controls whether the wrapping div is a fluid container or not.
   *
   * @property fluid
   * @type boolean
   * @default true
   * @public
   */
  @defaultValue
  fluid = true;

  /**
   * Specifies the position classes for the navbar, currently supporting none, "fixed-top", "fixed-bottom", and
   * either "static-top" (BS3) or "sticky-top" (BS4).
github kaliber5 / ember-bootstrap / addon / components / base / bs-modal.js View on Github external
* When the modal is closed by user interaction this property will not update by using two-way bindings in order
   * to follow DDAU best practices. If you want to react to such changes, subscribe to the `onHide` action
   *
   * @property open
   * @type boolean
   * @default true
   * @public
   */
  @defaultValue
  open = true;

  /**
   * @property isOpen
   * @private
   */
  @listenTo('open')
  isOpen;

  /**
   * @property _isOpen
   * @private
   */
  _isOpen = false;

  /**
   * Set to false to disable fade animations.
   *
   * @property fade
   * @type boolean
   * @default true
   * @public
   */
github kaliber5 / ember-bootstrap / addon / components / base / bs-tab.js View on Github external
*
   * When the selection is changed by user interaction this property will not update by using two-way bindings in order
   * to follow DDAU best practices. If you want to react to such changes, subscribe to the `onChange` action
   *
   * @property activeId
   * @type string
   * @public
   */
  @oneWay('childPanes.firstObject.elementId')
  activeId;

  /**
   * @property isActiveId
   * @private
   */
  @listenTo('activeId')
  isActiveId;

  /**
   * Set to false to disable the fade animation when switching tabs.
   *
   * @property fade
   * @type boolean
   * @default true
   * @public
   */
  fade = true;

  /**
   * The duration of the fade animation
   *
   * @property fadeDuration
github kaliber5 / ember-bootstrap / addon / components / base / bs-alert.js View on Github external
*
   * When the alert is dismissed by user interaction this property will not update by using two-way bindings in order
   * to follow DDAU best practices. If you want to react to such changes, subscribe to the `onDismiss` action
   *
   * @property visible
   * @type boolean
   * @default true
   * @public
   */
  visible = true;

  /**
   * @property _visible
   * @private
   */
  @listenTo('visible')
  _visible;

  /**
   * @property notVisible
   * @private
   */
  @not('_visible')
  notVisible;

  /**
   * Set to false to disable the fade out animation when hiding the alert.
   *
   * @property fade
   * @type boolean
   * @default true
   * @public