Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Auto = parent => class extends AutoForm.Auto(parent) {
static Auto = Auto;
onChange (key, value) {
// starting date should not be later than ending date
if (key === 'when.endingDate' && value < this.getModel().when.startingDate) {
super.onChange('when.startingDate', value)
} else if (key === 'when.startingDate' && value > this.getModel().when.endingDate) {
super.onChange('when.endingDate', value)
}
// pass on all changes to super
super.onChange(key, value)
}
}const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
static Auto = Auto;
};const Auto = parent =>
class extends AutoForm.Auto(parent) {
static Auto = Auto;
};const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
static Auto = Auto;
};const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
static Auto = Auto;
};const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
static Auto = Auto;
};const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
static Auto = Auto;
};