})
export class AttributeModalComponent implements OnInit {
- @ViewChild('defaultValue') validatedInput: InputComponent;
+ @ViewChild('_default') validatedInput: InputComponent;
public readonly types = AttributeOptions.types; // integer, string, boolean etc.
this.revalidateDefaultValue();
}
- onHiddenCheckboxClicked(event: boolean) {
- this.attributeToEdit.hidden = event;
- }
-
onTypeSelected(selectedElement: IDropDownOption) {
if (this.attributeToEdit.type !== selectedElement.value && selectedElement.value === 'boolean') {
- this.attributeToEdit.defaultValue = ''; // Clean old value in case we choose change type to boolean
+ this.attributeToEdit._default = ''; // Clean old value in case we choose change type to boolean
}
this.attributeToEdit.type = selectedElement.value;
this.revalidateDefaultValue();
onBooleanDefaultValueSelected(selectedElement: IDropDownOption) {
if (this.attributeToEdit.type === 'boolean') {
- this.attributeToEdit.defaultValue = selectedElement.value;
+ this.attributeToEdit._default = selectedElement.value;
}
}
}
public isMapUnique = () => {
- if (this.attributeToEdit && this.attributeToEdit.type === 'map' && this.attributeToEdit.defaultValue) {
- return ValidationUtils.validateUniqueKeys(this.attributeToEdit.defaultValue);
+ if (this.attributeToEdit && this.attributeToEdit.type === 'map' && this.attributeToEdit._default) {
+ return ValidationUtils.validateUniqueKeys(this.attributeToEdit._default);
}
return true;
}
this.setDefaultValuePattern(this.attributeToEdit.type);
setTimeout(() => {
if (this.validatedInput) {
- this.validatedInput.onKeyPress(this.attributeToEdit.defaultValue);
+ this.validatedInput.onKeyPress(this.attributeToEdit._default);
} }, 250);
}