1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-10 14:56:06 +00:00

No indeterminate checkboxes in simple modes

The simple checkbox modes (field and index) should not produce
indeterminate checkboxes. That should be reserved for the advanced modes
(list and filter).
This commit is contained in:
Robin Munn
2022-03-25 10:37:17 +07:00
parent 45215b9e7c
commit 88854720f5

View File

@@ -92,9 +92,7 @@ CheckboxWidget.prototype.getValue = function() {
if(this.checkboxUnchecked && !this.checkboxChecked) { if(this.checkboxUnchecked && !this.checkboxChecked) {
return true; // Absence of unchecked value return true; // Absence of unchecked value
} }
if(this.checkboxChecked && this.checkboxUnchecked) { // Do *not* return `undefined` in field or index mode: no indeterminate checkboxes in these modes
return undefined; // Will be rendered as indeterminate
}
} }
if(this.checkboxListField || this.checkboxFilter) { if(this.checkboxListField || this.checkboxFilter) {
// Same logic applies to lists and filters // Same logic applies to lists and filters