empty

Property is read-only. It cannot be set in script.

Returns true if the Selection Container contains no filters. Returns false if the Selection Container contains at least one filter, whether added in Visual Composer or by any user method. (See Bundle Filters in a Selection Container for more information about the user methods.)

Type

Boolean

true: Selection Container is empty
false: Selection Container is not empty

Example

if(CurrentSelection1.empty) {
  CurrentSelection1.visible = false;
}
else {
  CurrentSelection1.visible = true;
}

Either syntax below can be used in component script:

empty                       // unqualified
CurrentSelection1.empty     // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.