ChecklistFilterCombo

A specialized Combo box that displays its items as a list of checkboxes with a search field and "remove all" button, used for filtering data in Grid columns.

Checklist filter combo
//<code-header>
fiddle.title = 'Checklist filter combo';
//</code-header>
new ChecklistFilterCombo({
    width        : '25em',
    appendTo     : targetElement,
    displayField : 'city',
    valueField   : 'city',
    value        : ['Paris'],
    store        : {
        fields : [
            'city'
        ],
        data : [
            { city : 'Stockholm' },
            { city : 'Barcelona' },
            { city : 'Paris' },
            { city : 'Dubai' },
            { city : 'New York' },
            { city : 'San Francisco' },
            { city : 'Washington' },
            { city : 'Montreal' }
        ]
    }
});

To customize its contents you can:

  • Supply listItemPillTpl to render additional information in a pill alongside search results
  • Override listItemTpl to fully control item rendering
  • Configure showApplyButton to control when change events are fired
  • Reconfigure built-in widgets by providing override configs in the picker config's tbar, bbar, and items
  • Configure the store to change sorting of results
  • Built-in widgets

The built-in tbar widgets are:

Widget ref Type Weight Description
searchField TextField 100 Search the list (in tbar)

The built-in items widgets are:

Widget ref Type Weight Description
list List 100 List of selectable options

The built-in bbar buttons are:

Widget ref Type Weight Description
applyButton Button 100 Apply button, on the bbar, updates field value from list selection
selectAllButton Button 200 Select All button, on the bbar, selects all list items
removeAllButton Button 300 Remove All button, on the bbar, clears all list selections

Removing a built-in item

To remove a built-in widget, specify its ref as null in the items, tbar.items, or bbar.items config:

{
    type : 'checklistfiltercombo',
    bbar : {
        items : {
            selectAllButton : null   // Remove the selectAllButton
        }
    }
}

Customizing a built-in widget

To customize a built-in widget, use its ref as the key in the items config and specify the configs you want to change (they will merge with the widgets default configs):

{
    type : 'checklistfiltercombo',
    tbar : {
        items : {
            searchField : {
                placeholder : 'Search items...'
            }
        }
    }
}

Use with the FilterBar feature

To use a ChecklistFilterCombo as the filtering UI for a Grid column when using the FilterBar feature, specify it using type in the filterField config inside the column's filterable config:

{
    text       : 'City',
    field      : 'city',
    filterable : {
        filterField : {
            type     : 'checklistfiltercombo',
            operator : 'isIncludedIn'
            // ...any further ChecklistFilterCombo configs
        }
    }
},

Note the use of the 'isIncludedIn' operator on the filterField to get the expected "or" behavior.

Configs

148

Common

editablePickerField
listenersEvents

Other

Template to render optional content next to list items.

ParameterTypeDescription
recordModel

The list item's backing record

Returns: String

The text in the search box, which will filter the list to matching records only. See also filterOperator.

When true, shows an "Apply" button in place of the "Select All" button, and does not raise change events until the Apply button is clicked.

value: String[] | Number[]

The initial value of this Combo box. An array of record ids.

columnWidget
itemsCombo
listClsCombo
nameField
pickerCombo
renditionTextField
rtlRTL
spanWidget
storeCombo

Accessibility

ariaLabelWidget
keyMapKeyMap

Container

inlineField

CSS

clsWidget
colorWidget
htmlClsWidget
styleWidget
uiWidget

DOM

adoptWidget
appendToWidget
contentWidget
datasetWidget
htmlWidget
idWidget
tagWidget
titleWidget

Field

maxLengthTextField
minLengthTextField

Float & align

alignWidget
anchorWidget
centeredWidget
draggableWidget
floatingWidget
xWidget
yWidget

Input element

Label

hintField
labelLabelable
labelClsLabelable
labelPositionLabelable
labelsField
labelWidthLabelable

Layout

alignSelfWidget
dockWidget
flexWidget
heightWidget
hiddenWidget
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
textAlignWidget
weightWidget
widthWidget

Misc

badgeBadge
dataFieldWidget
disabledWidget
localeClassLocalizable
localizableLocalizable
maskedWidget
ownerWidget
refWidget
rippleWidget
tabWidget
tooltipWidget

Picker

autoExpandPickerField

Scrolling

Properties

100

Class hierarchy

isChecklistFilterCombo: Boolean= truereadonly
Identifies an object as an instance of ChecklistFilterCombo class, or subclass thereof.
isChecklistFilterCombo: Boolean= truereadonlystatic
Identifies an object as an instance of ChecklistFilterCombo class, or subclass thereof.
isBadgeBadge
isComboCombo
isDelayableDelayable
isEventsEvents
isFieldField
isFormulaFieldFormulaField
isKeyMapKeyMap
isLabelableLabelable
isLocalizableLocalizable
isPickerFieldPickerField
isTextFieldTextField
isValidatableValidatable
isWidgetWidget

Other

Template to render optional content next to list items.

ParameterTypeDescription
recordModel

The list item's backing record

Returns: String

The text in the search box, which will filter the list to matching records only. See also filterOperator.

When true, shows an "Apply" button in place of the "Select All" button, and does not raise change events until the Apply button is clicked.

$namestaticWidget
columnWidget
formulaFormulaField
inputField
isEmptyCombo
isValidField
pickerCombo
queryLaststaticCombo
recordCombo
recordsCombo
renditionTextField
rtlRTL
spanWidget
storeCombo
typestaticWidget
valueCombo

Accessibility

keyMapKeyMap

CSS

clsWidget

DOM

appendToWidget
contentWidget
datasetWidget
elementWidget
htmlWidget
idWidget
styleWidget

Float & align

xWidget
yWidget

Layout

alignSelfWidget
flexWidget
heightWidget
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
widthWidget

Lifecycle

configBase

Misc

badgeBadge
cellInfoWidget
disabledWidget
errorTipValidatable
labelLabelable
localeHelperLocalizable
localeManagerLocalizable
refWidget
tabWidget
tooltipWidget

Visibility

hiddenWidget
isVisibleWidget

Widget hierarchy

ownerWidget
parentWidget

Functions

67

Configuration

applyDefaultsstaticBase

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Misc

attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

clearField
clearErrorValidatable
composeWidget
createOnFrameDelayable
disableWidget
enableWidget
focusWidget
getErrorsValidatable
LstaticLocalizable
maskWidget
onEvents
recomposeWidget
relayAllEvents
selectField
setErrorValidatable
triggerEvents
unEvents
unmaskWidget

Picker

hidePickerPickerField
showPickerPickerField
togglePickerPickerField

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
eachWidgetPickerField
ownsWidget
queryWidget
queryAllWidget
upWidget

Events

20
actionCombo
catchAllEvents
changeField
clearField
destroyEvents
focusInWidget
focusOutWidget
hideWidget
inputCombo
paintWidget
readOnlyWidget
recomposeWidget
resizeWidget
selectCombo
showWidget
triggerField

Event handlers

20

Typedefs

7

CSS variables

132