UNPKG

@fleetbase/ember-ui

Version:

Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.

27 lines (21 loc) 634 B
import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; import { action } from '@ember/object'; export default class BulkSearchDropdownComponent extends Component { @tracked value = ''; constructor(owner, { value = '' }) { super(...arguments); this.value = value; } @action clear() { this.value = ''; if (typeof this.args.onClear === 'function') { this.args.onClear(this.value); } } @action submit() { if (typeof this.args.onSubmit === 'function') { this.args.onSubmit(this.value); } } }