Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return !isValid ? { invalidChips: true } : undefined;
},
},
],
},
];
elementOptions: any[] = [
TdDynamicElement.Input,
TdDynamicType.Number,
TdDynamicElement.Datepicker,
TdDynamicElement.Password,
TdDynamicElement.Textarea,
TdDynamicElement.Slider,
TdDynamicElement.Checkbox,
TdDynamicElement.SlideToggle,
TdDynamicElement.FileInput,
];
showDynamicCode: boolean = false;
type: any;
count: number = 2;
customValidationElements: ITdDynamicElementConfig[] = [
{
name: 'evenElement',
label: 'Even Number',
type: TdDynamicType.Number,
validators: [
{
return !isValid ? { invalidChips: true } : undefined;
},
},
],
},
];
elementOptions: any[] = [
TdDynamicElement.Input,
TdDynamicType.Number,
TdDynamicElement.Datepicker,
TdDynamicElement.Password,
TdDynamicElement.Textarea,
TdDynamicElement.Slider,
TdDynamicElement.Checkbox,
TdDynamicElement.SlideToggle,
TdDynamicElement.FileInput,
];
showDynamicCode: boolean = false;
type: any;
count: number = 2;
customValidationElements: ITdDynamicElementConfig[] = [
{
name: 'evenElement',
label: 'Even Number',
type: TdDynamicType.Number,
validators: [
{
min: 18,
max: 70,
},
];
booleanElements: ITdDynamicElementConfig[] = [
{
name: 'boolean',
label: 'Boolean Label',
type: TdDynamicType.Boolean,
hint: 'this is a boolean',
default: false,
},
{
name: 'slide-toggle',
type: TdDynamicElement.SlideToggle,
hint: 'this is a slide toggle',
default: true,
},
{
name: 'checkbox',
type: TdDynamicElement.Checkbox,
hint: 'this is a checkbox',
},
];
arrayElements: ITdDynamicElementConfig[] = [
{
name: 'array',
type: TdDynamicType.Array,
selections: ['Test1', 'Test2', 'Test3', 'Test4'],
default: 'Test1',
min: 18,
max: 70,
},
];
booleanElements: ITdDynamicElementConfig[] = [
{
name: 'boolean',
label: 'Boolean Label',
type: TdDynamicType.Boolean,
hint: 'this is a boolean',
default: false,
},
{
name: 'slide-toggle',
type: TdDynamicElement.SlideToggle,
hint: 'this is a slide toggle',
default: true,
},
{
name: 'checkbox',
type: TdDynamicElement.Checkbox,
hint: 'this is a checkbox',
},
];
arrayElements: ITdDynamicElementConfig[] = [
{
name: 'array',
type: TdDynamicType.Array,
selections: ['Test1', 'Test2', 'Test3', 'Test4'],
default: 'Test1',