Skip to content

PropertyPropertyWidgetComponentComboBox

Unofficial

Combobox component for PropertyPropertyWidgetComponent.

Import:

import type { PropertyPropertyWidgetComponentComboBox } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface PropertyPropertyWidgetComponentComboBox extends PopoverSuggest<PropertyPropertyWidgetComponentComboBoxItem>

Extends: PopoverSuggest<PropertyPropertyWidgetComponentComboBoxItem>

Constructor

new PropertyPropertyWidgetComponentComboBox(app: App, scope?: Scope | undefined)

Constructor.

To extract the constructor type, use ExtractConstructor<PopoverSuggest>.

Properties

PropertyTypeDescription
_itemsPropertyPropertyWidgetComponentComboBoxItem[]The items of the combobox.
appAppThe Obsidian app instance.
(Inherited from PopoverSuggest)
bgElHTMLDivElementThe background element of the combobox.
buttonElHTMLDivElementThe button element of the combobox.
clearablebooleanWhether the combobox is clearable.
iconElHTMLDivElementThe icon element of the combobox.
isOpenbooleanWhether the suggestion popup is currently open and visible.
(Inherited from PopoverSuggest)
labelElHTMLDivElementThe label element of the combobox.
scopeScopeThe scope for the keymaps.
(Inherited from PopoverSuggest)
searchComponentSearchComponentThe search component of the combobox.
suggestElHTMLDivElementSuggestion container element.
(Inherited from PopoverSuggest)
suggestInnerElHTMLElementThe inner element holding the rendered suggestions.
(Inherited from PopoverSuggest)
suggestionsSuggestModalChooser<PropertyPropertyWidgetComponentComboBoxItem, this>Handles selection and rendering of the suggestions.
(Inherited from PopoverSuggest)
valuenull | PropertyPropertyWidgetComponentComboBoxItemThe current value of the combobox.
winnull | WindowThe window the suggestion popover is shown in, or null while closed.
(Inherited from PopoverSuggest)

Methods

MethodReturnsDescription
_onClose()voidCallback for PropertyPropertyWidgetComponentComboBox.onClose.
_onOpen()voidCallback for PropertyPropertyWidgetComponentComboBox.onOpen.
attachDom()voidAttach the DOM of the combobox.
autoDestroy()voidAutomatically destroy the popover when its associated element is removed.
(Inherited from PopoverSuggest)
close()voidCloses the popover.
(Inherited from PopoverSuggest)
detachDom()Promise<void>Detach the DOM of the combobox.
focus()voidFocus the combobox.
getItems()PropertyPropertyWidgetComponentComboBoxItem[]Get the items of the combobox.
getSuggestions(query)SearchResult[]Callback for PropertyPropertyWidgetComponentComboBox.getSuggestions.
onClose(callback)thisRegister a callback for close event.
onEscapeKey()voidHandle the escape key to close the popover.
(Inherited from PopoverSuggest)
onHistoryBack()voidCalled when the user navigates back in the history.
(Inherited from PopoverSuggest)
onHistoryForward()voidCalled when the user navigates forward in the history.
(Inherited from PopoverSuggest)
onInputChange(query)voidHandle the input change event of the combobox.
onOpen(callback)thisRegister a callback for open event.
onSelect(callback)thisRegister a callback for select event.
onSelectedChange(value, evt?)voidCalled after every selection change, including the programmatic one that follows SuggestModalChooser.setSuggestions.
(Inherited from PopoverSuggest)
open()voidOpens the popover.
(Inherited from PopoverSuggest)
renderLabel()voidRender the label of the combobox.
renderSuggestion(value, el)voidRender the suggestion.
(Inherited from PopoverSuggest)
reposition(rect, textDirection?)voidReposition the popover relative to the given bounding rectangle.
(Inherited from PopoverSuggest)
selectCb(item)voidCallback for PropertyPropertyWidgetComponentComboBox.onSelect.
selectSuggestion(value, evt)voidSelect the suggestion.
(Inherited from PopoverSuggest)
setAutoDestroy(el)voidSet the element that triggers automatic destruction of the popover when removed.
(Inherited from PopoverSuggest)
setClearable(clearable)thisSet the clearable state of the combobox.
setItems(items)thisSet the items of the combobox.
setPlaceholder(placeholder)thisSet the placeholder of the combobox.
setValue(value)thisSet the value of the combobox.
setValueById(id)thisSet the value of the combobox by its id.
toggle()unknownToggle the combobox.
updateValue(value)thisUpdate the value of the combobox.

Links to this page: