Newer
Older
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
export default class NewGroupComponent extends Component {
@service store;
@tracked form_visible = false;
this.form_visible = !this.form_visible;
this.store.createRecord('group', {
name: this.new_name,
}).save();
this._empty_form();
}
@action
onCancel() {
this._empty_form();
}
_empty_form() {
/*
Resets the form to initial state
*/