@fleetbase/ember-ui
Version:
Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.
24 lines (18 loc) • 622 B
JavaScript
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import toBoolean from '@fleetbase/ember-core/utils/to-boolean';
export default class FilterCheckboxComponent extends Component {
value = false;
constructor(owner, { value = false }) {
super(...arguments);
this.value = toBoolean(value);
}
onChange(checked) {
const { onChange, filter } = this.args;
this.value = checked;
if (typeof onChange === 'function') {
onChange(filter, checked);
}
}
}