Skip to content

Commit 38afd8f

Browse files
author
NarrowsProjects
committed
chore: improve isEmpty comments for toggleFilterModel
1 parent 65dc49c commit 38afd8f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

lib/public/components/Filters/common/filters/ToggleFilterModel.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,15 @@ export class ToggleFilterModel extends SelectionModel {
5151
}
5252

5353
/**
54-
* @inheritdoc
54+
* By default, a value of `false` is treated as an empty state, meaning
55+
* the filter is effectively not applied when toggled off.
56+
*
57+
* However, if the model was constructed with `falseIsEmpty = true`,
58+
* then `false` is treated as a valid (non-empty) selection, and this
59+
* method will always return `false`.
60+
*
61+
* @return {boolean} `true` if the current value is considered empty,
62+
* otherwise `false`.
5563
*/
5664
get isEmpty() {
5765
if (!this._falseIsEmpty) {

0 commit comments

Comments
 (0)