@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
JavaScript
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
export default class BulkSearchDropdownComponent extends Component {
value = '';
constructor(owner, { value = '' }) {
super(...arguments);
this.value = value;
}
clear() {
this.value = '';
if (typeof this.args.onClear === 'function') {
this.args.onClear(this.value);
}
}
submit() {
if (typeof this.args.onSubmit === 'function') {
this.args.onSubmit(this.value);
}
}
}