Fix nullable boolean (#8497)

* nullable boolean can now be set to null again after it weas true or false

* Implementation changed to Composition API

* Implementation changed to Composition API

* fixed formatting issues

* fixed formatting issues

* fixed formatting issues

* fixed formatting issues

* run linters on branch

* run linters on branch

* run linters on branch

* run linters on branch

* fixed formatting issues

* changes to checkbox interface reverted

* changes to checkbox interface reverted

* Update boolean.vue
This commit is contained in:
Paul Boudewijn
2021-11-02 15:39:39 +01:00
committed by GitHub
parent 7fbd135c0b
commit d4095bc2aa

View File

@@ -64,7 +64,13 @@ export class PayloadService {
},
async boolean({ action, value }) {
if (action === 'read') {
return value === true || value === 1 || value === '1';
if (value === true || value === 1 || value === '1') {
return true;
} else if (value === false || value === 0 || value === '0') {
return false;
} else if (value === null || value === '') {
return null;
}
}
return value;