v7.3.0

BooleanCombo
Widget

A specialized Combo that presents exactly two options representing true and false. It is useful for editing boolean fields in forms or as an inline cell editor in a Grid column. The display text for each option defaults to the localized "Yes"/"No" strings but can be customized using positiveText and negativeText.

const combo = new BooleanCombo({
    label         : 'Active',
    positiveText  : 'Enabled',
    negativeText  : 'Disabled',
    value         : true,
    appendTo      : document.body
});

Useful configs and properties

Config Description
positiveValue The value representing the positive/true option (default true)
positiveText Display text for the positive option (default localized "Yes")
negativeValue The value representing the negative/false option (default false)
negativeText Display text for the negative option (default localized "No")
value Gets or sets the current boolean value

See also

  • Combo - Base combo class with filtering, remote loading, and multiselect
  • Checkbox - Alternative boolean input rendered as a checkbox
No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class

Properties

Properties are getters/setters or publicly accessible variables on this class
type: booleancombo

Source path

Core/widget/BooleanCombo.js

Contents