diff --git a/docs/src/components/combobox.njk b/docs/src/components/combobox.njk index aabbf7c..c7c4cc1 100644 --- a/docs/src/components/combobox.njk +++ b/docs/src/components/combobox.njk @@ -15,6 +15,10 @@ toc: id: usage-html-js-2 - label: HTML structure id: usage-html-js-3 + - label: JavaScript events + id: usage-html-js-4 + - label: JavaScript methods + id: usage-html-js-5 - label: Jinja and Nunjucks id: usage-macro - label: Examples @@ -130,6 +134,38 @@ toc: +
basecoat:initializedbasecoat:initialized event on itself.basecoat:popoverbasecoat:popover event on document. Other popover components (Combobox, Dropdown Menu, Popover and Select) listen for this to close any open popovers.changechange event on itself, with the selected value in event.detail (e.g. {detail: {value: "something"}}).selectByValueYou can call this method on the component after it is initialized to select an option by value (i.e. the option with the matching data-value attribute):
basecoat:initializedbasecoat:initialized event on itself.basecoat:popoverbasecoat:popover event on document. Other popover components (Combobox, Dropdown Menu, Popover and Select) listen for this to close any open popovers.basecoat:initializedbasecoat:initialized event on itself.basecoat:popoverbasecoat:popover event on document. Other popover components (Combobox, Dropdown Menu, Popover and Select) listen for this to close any open popovers.basecoat:initializedbasecoat:initialized event on itself.basecoat:popoverbasecoat:popover event on document. Other popover components (Combobox, Dropdown Menu, Popover and Select) listen for this to close any open popovers.changechange event on itself, with the selected value in event.detail (e.g. { detail: { value: "something" }}).selectByValueYou can call this method on the component after it is initialized to select an option by value (i.e. the option with the matching data-value attribute):
Any element on the page can toggle, open or close the sidebar by dispatching the basecoat:sidebar. By default, the event will toggle the sidebar, but can be used to open or close if you add an action to the detail:
basecoat:initializedbasecoat:initialized event on itself.basecoat:sidebarSidebars listen for this event on document to open, close or toggle themselves. By default, the event will toggle the sidebar, but can be used to open or close if you add an action to the detail. Additionally, if you have multiple sidebars on the page, you can target a specific sidebar by adding its id to the detail:
basecoat:initializedbasecoat:initialized event on itself.basecoat:initializedbasecoat:initialized event on the toaster element.basecoat:toastThe toaster listens for basecoat:toast events on document to create toasts. The event's detail object must contain a config object (see JavaScript config object below).