Skip to contents

Create a Combobox component

Usage

calcite_combobox(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
allowCustomValuesallow-custom-valuesWhen true, allows entry of custom values, which are not in the original set of items.booleanTRUE
clearDisabledclear-disabledWhen true, the value-clearing will be disabled.booleanTRUE
disableddisabledWhen true, interaction is prevented and the component is displayed with lower opacity.booleanTRUE
filteredItemsNASpecifies the component's filtered items.Check API referenceFALSE
filterPropsNASpecifies the properties to match against when filtering. If not set, all properties will be matched (label, description, metadata, value).Check API referenceFALSE
filterTextfilter-textText for the component's filter input field.stringTRUE
flipPlacementsNASpecifies the component's fallback slotted content placement when it's initial placement has insufficient space available.Check API referenceFALSE
formformThe id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any.stringTRUE
labellabelAccessible name for the component.stringFALSE
maxItemsmax-itemsSpecifies the maximum number of calcite-combobox-items (including nested children) to display before displaying a scrollbar.numberTRUE
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
namenameSpecifies the name of the component. Required to pass the component's value on form submission.stringTRUE
openopenWhen true, displays and positions the component.booleanTRUE
overlayPositioningoverlay-positioningDetermines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed"."absolute" | "fixed"TRUE
placeholderplaceholderSpecifies the placeholder text for the input.stringFALSE
placeholderIconplaceholder-iconSpecifies the placeholder icon for the input.stringTRUE
placeholderIconFlipRtlplaceholder-icon-flip-rtlWhen true, the icon will be flipped when the element direction is right-to-left ("rtl").booleanTRUE
readOnlyread-onlyWhen true, the component's value can be read, but controls are not accessible and the value cannot be modified.booleanTRUE
requiredrequiredWhen true and the component resides in a form, the component must have a value in order for the form to submit.booleanTRUE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
selectedItemsNASpecifies the component's selected items.Check API referenceFALSE
selectionDisplayselection-displayWhen selectionMode is "ancestors" or "multiple", specifies the display of multiple calcite-combobox-item selections, where: "all" displays all selections with individual calcite-chips, "fit" displays individual calcite-chips that scale to the component's size, including a non-closable calcite-chip, which provides the number of additional calcite-combobox-item selections not visually displayed, and "single" displays one calcite-chip with the total number of selections."all" | "fit" | "single"TRUE
selectionModeselection-modeSpecifies the selection mode of the component, where: "multiple" allows any number of selections, "single" allows only one selection, "single-persist" allows one selection and prevents de-selection, and "ancestors" allows multiple selections, but shows ancestors of selected items as selected, with only deepest children shown in chips."ancestors" | "multiple" | "single" | "single-persist"TRUE
statusstatusSpecifies the status of the input field, which determines message and icons."idle" | "invalid" | "valid"TRUE
validationIconvalidation-iconSpecifies the validation icon to display under the component.boolean | stringTRUE
validationMessagevalidation-messageSpecifies the validation message to display under the component.stringFALSE
validityNAThe current validation state of the component.Check API referenceFALSE
valuevalueThe component's value(s) from the selected calcite-combobox-item(s).Check API referenceFALSE

Events

The following events are observed by shiny:

EventDescription
calciteComboboxBeforeCloseFires when the component is requested to be closed, and before the closing transition begins.
calciteComboboxBeforeOpenFires when the component is added to the DOM but not rendered, and before the opening transition begins.
calciteComboboxChangeFires when the selected item(s) changes.
calciteComboboxChipCloseFires when a selected item in the component is closed via its calcite-chip.
calciteComboboxCloseFires when the component is closed and animation is complete.
calciteComboboxFilterChangeFires when text is added to filter the options list.
calciteComboboxOpenFires when the component is open and animation is complete.

Slots

The following slots are provided by this component:

SlotDescription
Default (unnamed)A slot for adding calcite-combobox-items.

Examples

calcite_combobox()
#> <calcite-combobox></calcite-combobox>