@alihbuzaid/ember-ui
Version:
Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.
22 lines (16 loc) • 625 B
JavaScript
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
export default class WidgetQueryParamsComponent extends Component {
changedParams = {};
onChange(param, value) {
const component = this.args.params[param].component;
if (component === 'date-picker') {
value = value.formattedDate;
}
this.changedParams = { ...this.changedParams, [param]: value };
if (typeof this.args.onChange === 'function') {
this.args.onChange(this.changedParams);
}
}
}