Name
|
Type
|
Default Value
|
animation
|
string
|
'advanced'
|
Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
Possible values: - 'none' - animation is disabled
- 'simple' - ripple animation is disabled
- 'advanced' - all animations are enabled
Code examples
Set the animation property.
<smart-drop-down-button animation='none'></smart-drop-down-button> Set the animation property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.animation = 'simple';
Get the animation property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let animation = dropDownButton.animation;
|
autoCloseDelay
|
number
|
100
|
Determines the delay before the opened drop down closes when dropDownOpenMode is set to 'auto'.
Code examples
Set the autoCloseDelay property.
<smart-drop-down-button auto-close-delay='50'></smart-drop-down-button> Set the autoCloseDelay property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.autoCloseDelay = 200;
Get the autoCloseDelay property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let autoCloseDelay = dropDownButton.autoCloseDelay;
|
disabled
|
boolean
|
false
|
Enables or disables the element.
Code examples
Set the disabled property.
<smart-drop-down-button disabled></smart-drop-down-button> Set the disabled property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.disabled = false;
Get the disabled property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let disabled = dropDownButton.disabled;
|
dropDownAppendTo
|
any
|
null
|
Sets the parent container of the dropDown (the popup). Used when a CSS property of unknowned parent is interfering with the visibility of the dropDown.
Try a demo showcasing the property dropDownAppendTo.
Code examples
Set the dropDownAppendTo property.
<smart-drop-down-button drop-down-append-to='body'></smart-drop-down-button> Set the dropDownAppendTo property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownAppendTo = null;
Get the dropDownAppendTo property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownAppendTo = dropDownButton.dropDownAppendTo;
|
dropDownButtonPosition
|
string
|
'right'
|
Determines the position of the drop down button.
Possible values: - 'left' - Positions the drop down button on the left side of the element.
- 'right' - Positions the drop down button on the right side of the element.
- 'top' - Positions the drop down button on the top side of the element.
- 'bottom' - Positions the drop down button on the bottom side of the element.
Try a demo showcasing the property dropDownButtonPosition.
Code examples
Set the dropDownButtonPosition property.
<smart-drop-down-button drop-down-button-position='left'></smart-drop-down-button> Set the dropDownButtonPosition property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownButtonPosition = 'null';
Get the dropDownButtonPosition property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownButtonPosition = dropDownButton.dropDownButtonPosition;
|
dropDownHeight
|
string | number
|
|
Sets the height of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
Code examples
Set the dropDownHeight property.
<smart-drop-down-button drop-down-height='300'></smart-drop-down-button> Set the dropDownHeight property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownHeight = 500;
Get the dropDownHeight property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownHeight = dropDownButton.dropDownHeight;
|
dropDownMaxHeight
|
string | number
|
|
Sets the max height of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
Code examples
Set the dropDownMaxHeight property.
<smart-drop-down-button drop-down-max-height='800'></smart-drop-down-button> Set the dropDownMaxHeight property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownMaxHeight = 1000;
Get the dropDownMaxHeight property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownMaxHeight = dropDownButton.dropDownMaxHeight;
|
dropDownMaxWidth
|
string | number
|
|
Sets the max width of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
Code examples
Set the dropDownMaxWidth property.
<smart-drop-down-button drop-down-max-width='500'></smart-drop-down-button> Set the dropDownMaxWidth property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownMaxWidth = 800;
Get the dropDownMaxWidth property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownMaxWidth = dropDownButton.dropDownMaxWidth;
|
dropDownMinHeight
|
string | number
|
|
Sets the min height of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
Code examples
Set the dropDownMinHeight property.
<smart-drop-down-button drop-down-min-height='50'></smart-drop-down-button> Set the dropDownMinHeight property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownMinHeight = 150;
Get the dropDownMinHeight property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownMinHeight = dropDownButton.dropDownMinHeight;
|
dropDownMinWidth
|
string | number
|
|
Sets the min width of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
Code examples
Set the dropDownMinWidth property.
<smart-drop-down-button drop-down-min-width='100'></smart-drop-down-button> Set the dropDownMinWidth property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownMinWidth = 90;
Get the dropDownMinWidth property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownMinWidth = dropDownButton.dropDownMinWidth;
|
dropDownOpenMode
|
string
|
'default'
|
Determines how the drop down is going to open.
Possible values: - 'none' - The drop down can't be opened.
- 'default' - The drop down opens when the user clicks on the element
- 'dropDownButton' - The element is split in two button: action and drop down buttons. The drop down opens only when the button is clicked. The action button fires a custom event when clicked on. The event can be used to execute a custom operation on click.
- 'auto' - The drop down opens when the element is hovered and closed when not.
Try a demo showcasing the property dropDownOpenMode.
Code examples
Set the dropDownOpenMode property.
<smart-drop-down-button drop-down-open-mode='dropDownButton'></smart-drop-down-button> Set the dropDownOpenMode property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownOpenMode = 'auto';
Get the dropDownOpenMode property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownOpenMode = dropDownButton.dropDownOpenMode;
|
dropDownOverlay
|
boolean
|
false
|
If this property is enabled, when the element's dropdown is opened, a transparent overlay is positioned between the dropdown and the rest of the document.
Code examples
Set the dropDownOverlay property.
<smart-drop-down-button drop-down-overlay></smart-drop-down-button> Set the dropDownOverlay property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownOverlay = false;
Get the dropDownOverlay property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownOverlay = dropDownButton.dropDownOverlay;
|
dropDownPlaceholder
|
string
|
'No Items'
|
Sets a placeholder text to appear when there is no content inside the dropdown.
Code examples
Set the dropDownPlaceholder property.
<smart-drop-down-button drop-down-placeholder='No content'></smart-drop-down-button> Set the dropDownPlaceholder property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownPlaceholder = 'Empty';
Get the dropDownPlaceholder property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownPlaceholder = dropDownButton.dropDownPlaceholder;
|
dropDownPosition
|
string
|
'auto'
|
Determines the vertical position of the dropDown. 'Auto' means its automatically determined depending on the viewport size.
Possible values: - 'auto' - The position is automatically determines by measuring the available distance around the element for the drop down to open freely without being clipped by the edges of the browser. By default the drop down will try to open below the element. If the available space is not enough for the popup to appear it will open in one of the following directions, if possible: top, over.
Try a demo showcasing dropDownPosition: 'auto'. - 'top' - The drop down opens above the element.
- 'bottom' - The drop down opens under the element.
- 'overlay-top' - The drop down opens above and over the element. The bottom edges of the drop down cover the element.
- 'overlay-center' - The drop down opens at the center, over the element.
- 'overlay-bottom' - The drop down opens under and over the element. The top edges of the drop down cover the element.
- 'center-bottom' - The drop down opens at the center, below the element.
- 'center-top' - The drop down opens at the center, over the element.
Try a demo showcasing the property dropDownPosition.
Code examples
Set the dropDownPosition property.
<smart-drop-down-button drop-down-position='top'></smart-drop-down-button> Set the dropDownPosition property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownPosition = 'bottom';
Get the dropDownPosition property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownPosition = dropDownButton.dropDownPosition;
|
dropDownWidth
|
string | number
|
|
Sets the width of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
Code examples
Set the dropDownWidth property.
<smart-drop-down-button drop-down-width='300'></smart-drop-down-button> Set the dropDownWidth property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.dropDownWidth = 500;
Get the dropDownWidth property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let dropDownWidth = dropDownButton.dropDownWidth;
|
hint
|
string
|
''
|
Sets additional helper text below the element. The hint is visible only when the element is focused.
Code examples
Set the hint property.
<smart-drop-down-button hint='Helper text'></smart-drop-down-button> Set the hint property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.hint = 'Hint';
Get the hint property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let hint = dropDownButton.hint;
|
horizontalScrollBarVisibility
|
string
|
'auto'
|
Determines the visibility of the horizontal Scroll bar inside the drop down.
Possible values: - 'auto' - The element automatically determines whether or not the horizontal Scroll bar should be visible or not.
- 'disabled' - Disables the horizontal Scroll bar.
- 'hidden' - Hides the horizontal Scroll bar.
- 'visible' - Shows the horizontal Scroll bar even if not necessary.
Code examples
Set the horizontalScrollBarVisibility property.
<smart-drop-down-button horizontal-scroll-bar-visibility='disabled'></smart-drop-down-button> Set the horizontalScrollBarVisibility property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.horizontalScrollBarVisibility = 'hidden';
Get the horizontalScrollBarVisibility property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let horizontalScrollBarVisibility = dropDownButton.horizontalScrollBarVisibility;
|
label
|
string
|
''
|
Sets a label above the element. The label is always visible.
Code examples
Set the label property.
<smart-drop-down-button label='Helper text'></smart-drop-down-button> Set the label property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.label = 'Label';
Get the label property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let label = dropDownButton.label;
|
locale
|
string
|
'en'
|
Sets or gets the language. Used in conjunction with the property messages.
Code examples
Set the locale property.
<smart-drop-down-button locale='de'></smart-drop-down-button> Set the locale property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.locale = 'en';
Get the locale property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let locale = dropDownButton.locale;
|
localizeFormatFunction
|
function | null
|
null
|
Callback used to customize the format of the messages that are returned from the Localization Module.
Code examples
Set the localizeFormatFunction property.
<smart-drop-down-button localize-format-function='function(defaultMessage, message, messageArguments){return '...'}'></smart-drop-down-button> Set the localizeFormatFunction property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.localizeFormatFunction = function(defaultMessage, message, messageArguments){return '...'};
Get the localizeFormatFunction property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let localizeFormatFunction = dropDownButton.localizeFormatFunction;
|
messages
|
object
|
Please expand entry to see value
|
Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
Default value:
{
"en": {
"propertyUnknownType": "'{{name}}' property is with undefined 'type' member!",
"propertyInvalidValue": "Invalid '{{name}}' property value! Actual value: {{actualValue}}, Expected value: {{value}}!",
"propertyInvalidValueType": "Invalid '{{name}}' property value type! Actual type: {{actualType}}, Expected type: {{type}}!",
"elementNotInDOM": "Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.",
"moduleUndefined": "Module is undefined.",
"missingReference": "{{elementType}}: Missing reference to {{files}}.",
"invalidNode": "{{elementType}}: Invalid parameter '{{node}}' when calling {{method}}."
}
}
Code examples
Set the messages property.
<smart-drop-down-button messages='{"de":{"propertyUnknownType":"Die Eigenschaft '{{name}}' hat ein nicht definiertes 'type'-Member!","propertyInvalidValue":"Ungultiger Eigenschaftswert '{{name}}'! Aktueller Wert: {{actualValue}}, Erwarteter Wert: {{value}}!","propertyInvalidValueType":"Ungultiger Eigenschaftswert '{{name}}'! Aktueller Wert: {{actualType}}, Erwarteter Wert: {{type}}!","elementNotInDOM":"Element existiert nicht in DOM! Bitte fugen Sie das Element zum DOM hinzu, bevor Sie eine Methode aufrufen.","moduleUndefined":"Modul ist nicht definiert.","missingReference":"{{elementType}}: Fehlender Verweis auf {{files}}.","invalidNode":"{{elementType}}: Ungultiger Parameter '{{node}}' beim Aufruf von {{method}}."}}'></smart-drop-down-button> Set the messages property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.messages = {"en":{"propertyUnknownType":"'{{name}}' property is with undefined 'type' member!","propertyInvalidValue":"Invalid '{{name}}' property value! Actual value: {{actualValue}}, Expected value: {{value}}!","propertyInvalidValueType":"Invalid '{{name}}' property value type! Actual type: {{actualType}}, Expected type: {{type}}!","elementNotInDOM":"Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.","moduleUndefined":"Module is undefined.","missingReference":"{{elementType}}: Missing reference to {{files}}.","invalidNode":"{{elementType}}: Invalid parameter '{{node}}' when calling {{method}}."}};
Get the messages property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let messages = dropDownButton.messages;
|
opened
|
boolean
|
false
|
Determines whether the popup is opened or closed
Code examples
Set the opened property.
<smart-drop-down-button opened></smart-drop-down-button> Set the opened property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.opened = false;
Get the opened property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let opened = dropDownButton.opened;
|
placeholder
|
string
|
''
|
Determines the element's placeholder, displayed in the element's action button container.
Try a demo showcasing the property placeholder.
Code examples
Set the placeholder property.
<smart-drop-down-button placeholder='Choose:'></smart-drop-down-button> Set the placeholder property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.placeholder = 'Submit';
Get the placeholder property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let placeholder = dropDownButton.placeholder;
|
readonly
|
boolean
|
false
|
Disables user interaction with the element.
Code examples
Set the readonly property.
<smart-drop-down-button readonly></smart-drop-down-button> Set the readonly property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.readonly = false;
Get the readonly property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let readonly = dropDownButton.readonly;
|
resizeIndicator
|
boolean
|
false
|
Determines whether the resize indicator in the bottom right corner is visible or not.
Code examples
Set the resizeIndicator property.
<smart-drop-down-button resize-indicator></smart-drop-down-button> Set the resizeIndicator property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.resizeIndicator = false;
Get the resizeIndicator property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let resizeIndicator = dropDownButton.resizeIndicator;
|
resizeMode
|
string
|
'null'
|
Determines whether the dropDown can be resized or not. When resizing is enabled, a resize bar appears on the top/bottom side of the drop down.
Possible values: - 'none' - Resizing the drop down is not allowed.
- 'horizontal' - Horizontal resizing of the drop down is allowed but not vertical.
- 'vertical' - Vertical resizing of the drop down is allowed but not horizontal.
- 'both' - Resizing the drop down is allowed in all directions.
Try a demo showcasing the property resizeMode.
Code examples
Set the resizeMode property.
<smart-drop-down-button resize-mode='horizontal'></smart-drop-down-button> Set the resizeMode property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.resizeMode = 'vertical';
Get the resizeMode property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let resizeMode = dropDownButton.resizeMode;
|
rightToLeft
|
boolean
|
false
|
Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
Try a demo showcasing the property rightToLeft.
Code examples
Set the rightToLeft property.
<smart-drop-down-button right-to-left></smart-drop-down-button> Set the rightToLeft property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.rightToLeft = true;
Get the rightToLeft property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let rightToLeft = dropDownButton.rightToLeft;
|
theme
|
string
|
''
|
Determines the theme. Theme defines the look of the element
Code examples
Set the theme property.
<smart-drop-down-button theme='blue'></smart-drop-down-button> Set the theme property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.theme = 'red';
Get the theme property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let theme = dropDownButton.theme;
|
unfocusable
|
boolean
|
false
|
If is set to true, the element cannot be focused.
Code examples
Set the unfocusable property.
<smart-drop-down-button unfocusable></smart-drop-down-button> Set the unfocusable property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.unfocusable = false;
Get the unfocusable property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let unfocusable = dropDownButton.unfocusable;
|
verticalScrollBarVisibility
|
string
|
'auto'
|
Determines the visibility of the vertical scroll bar.
Possible values: - 'auto' - The element automatically determines whether or not the horizontal Scroll bar should be visible or not.
- 'disabled' - Disables the horizontal Scroll bar.
- 'hidden' - Hides the horizontal Scroll bar.
- 'visible' - Shows the horizontal Scroll bar even if it is not necessary.
Code examples
Set the verticalScrollBarVisibility property.
<smart-drop-down-button vertical-scroll-bar-visibility='hidden'></smart-drop-down-button> Set the verticalScrollBarVisibility property by using the HTML Element's instance.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.verticalScrollBarVisibility = 'visible';
Get the verticalScrollBarVisibility property.
const dropDownButton = document.querySelector('smart-drop-down-button');
let verticalScrollBarVisibility = dropDownButton.verticalScrollBarVisibility;
|
|
Name
|
Type
|
|
actionButtonClick
|
Event
|
|
This event is triggered when user clicks on the action button. The action button is visible when the placeholder is set.
Try a demo showcasing the event actionButtonClick.
Code examples
Bind to the actionButtonClick event by type: smartDropDownButton
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.addEventListener('actionButtonClick', function (event) {
// event handling code goes here.
}
|
close
|
Event
|
|
This event is triggered when the drop down is closed.
Try a demo showcasing the event close.
Code examples
Bind to the close event by type: smartDropDownButton
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.addEventListener('close', function (event) {
// event handling code goes here.
}
|
closing
|
Event
|
|
This event is triggered when the drop down list is about to be closed. This event allows to cancel the closing operation calling event.preventDefault() in the event handler function.
Try a demo showcasing the event closing.
Code examples
Bind to the closing event by type: smartDropDownButton
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.addEventListener('closing', function (event) {
// event handling code goes here.
}
|
dropDownButtonClick
|
Event
|
|
This event is triggered when user clicks on the drop down button.
Try a demo showcasing the event dropDownButtonClick.
Code examples
Bind to the dropDownButtonClick event by type: smartDropDownButton
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.addEventListener('dropDownButtonClick', function (event) {
// event handling code goes here.
}
|
open
|
Event
|
|
This event is triggered when the drop down is opened.
Try a demo showcasing the event open.
Code examples
Bind to the open event by type: smartDropDownButton
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.addEventListener('open', function (event) {
// event handling code goes here.
}
|
opening
|
Event
|
|
This event is triggered when the drop down is about to be opened. This event allows to cancel the opening operation calling event.preventDefault() in the event handler function.
Try a demo showcasing the event opening.
Code examples
Bind to the opening event by type: smartDropDownButton
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.addEventListener('opening', function (event) {
// event handling code goes here.
}
|
resizeStart
|
Event
|
|
This event is triggered when user starts resizing the drop down.
Detail:
- position - An object containing the current left and top positions of the drop down.
Code examples
Bind to the resizeStart event by type: smartDropDownButton
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.addEventListener('resizeStart', function (event) {
const detail = event.detail,
position = detail.position;
// event handling code goes here.
}
|
resizeEnd
|
Event
|
|
This event is triggered when user finishes resizing the drop down.
Detail:
- position - An object containing the current left and top positions of the drop down.
Code examples
Bind to the resizeEnd event by type: smartDropDownButton
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.addEventListener('resizeEnd', function (event) {
const detail = event.detail,
position = detail.position;
// event handling code goes here.
}
|
|
Name
|
Type
|
Return Type
|
appendChild(node: HTMLElement): void
|
Method
|
void
|
Appends a new HTML node to the drop down.
Parameter |
Type |
Description |
node |
HTMLElement |
The node to be appended |
Return Type
void
Try a demo showcasing the method appendChild.
Code examples
Invoke the appendChild method.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.appendChild(htmlElementNode);
|
close(): void
|
Method
|
void
|
Closes the dropDown.
Return Type
void
Try a demo showcasing the method close.
Code examples
Invoke the close method.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.close();
|
open(): void
|
Method
|
void
|
Opens the dropDown.
Return Type
void
Try a demo showcasing the method open.
Code examples
Invoke the open method.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.open();
|
removeAll(): void
|
Method
|
void
|
Removes everything from the drop down.
Return Type
void
Try a demo showcasing the method removeAll.
Code examples
Invoke the removeAll method.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.removeAll();
|
removeChild(node: HTMLElement): void
|
Method
|
void
|
Removes a child node from the drop down.
Parameter |
Type |
Description |
node |
HTMLElement |
The node to remove. |
Return Type
void
Try a demo showcasing the method removeChild.
Code examples
Invoke the removeChild method.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.removeChild(htmlElementNode);
|
scrollTo(top: number, left: number): void
|
Method
|
void
|
Scrolls the drop down to a specific position.
Parameter |
Type |
Description |
top |
number |
Y axis coordinate |
left |
number |
X axis coordinate |
Return Type
void
Code examples
Invoke the scrollTo method.
const dropDownButton = document.querySelector('smart-drop-down-button');
dropDownButton.scrollTo(20, 20);
|