Enhancement: Explain behavior of unset app config boolean to user (#5345)

This commit is contained in:
shamoon
2024-01-10 15:34:20 -08:00
committed by GitHub
parent 8e8810cbaa
commit 3dcb973adb
5 changed files with 45 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
import { Component, forwardRef } from '@angular/core'
import { Component, Input, forwardRef } from '@angular/core'
import { NG_VALUE_ACCESSOR } from '@angular/forms'
import { AbstractInputComponent } from '../abstract-input'
@@ -15,7 +15,14 @@ import { AbstractInputComponent } from '../abstract-input'
styleUrls: ['./switch.component.scss'],
})
export class SwitchComponent extends AbstractInputComponent<boolean> {
@Input()
showUnsetNote: boolean = false
constructor() {
super()
}
get isUnset(): boolean {
return this.value === null || this.value === undefined
}
}