1.1.33 • Published 4 years ago

@singleware/ui-select v1.1.33

Weekly downloads
14
License
MIT
Repository
github
Last release
4 years ago

UI-Select

Custom HTML element used to replace the common select element, this custom element provides a simple way to customize the select input, arrow, list and its options inside.

State Attributes

NameDescription
emptyAutomatically assigned when there is no option selected
openedAutomatically assigned when the options list is displayed
foundAutomatically assigned when there are options found
invalidAutomatically assigned when there is an invalid option selected

Mirrored Properties

NameDescription
nameGet and set the element name in the input slot
requiredGet and set the required state in the input slot element
disabledGet and set the disabled state in the input slot element

Properties

NameDescription
selectionGet the current selected option
searchGet the current search text
openedGet the current opened state
foundGet the options found state
countGet the total number of options
emptyGet the current empty state
valueGet the selected value or selects another options
defaultValueGet and set the defaultValue
searchableGet and set the searchable state
readOnlyGet and set the readOnly state
optionsSet the initial list of options in the component construction

Methods

NameDescription
focusMove the focus to the input slot element
resetReset the current value to the default value
checkValidityGet the validity of the input slot element
setCustomValiditySet a custom validity in the input slot element
addGroupAdds a new group to be used by options
addOptionAdds a new select option
clearClear all options
openOpens the options list
closeCloses the options list
toggleToggles the options list

Slots

NameDescription
inputElement to shows the selected option. Use: input or button element
searchElement to shows the options search (can be omitted)
arrowElement to shows the customizable arrow (can be omitted)
resultElement to aggregate options with their groups
emptyElement to be visible when there are no options in the result

Events

NameDescription
focusDispatched when the input slot is focused
blurDispatched when the input slot loses focus
changeDispatched when a different option is selected
renderoptionDispatched when an option is added, needs to render the option element
renderselectionDispatched when as option is selected, needs to render the current selection
rendergroupDispatched when an group is added, needs to render the group element

Install

Using npm:

npm i @singleware/ui-select

License

MIT © Silas B. Domingos

1.1.33

4 years ago

1.1.32

4 years ago

1.1.31

4 years ago

1.1.30

4 years ago

1.1.29

5 years ago

1.1.28

5 years ago

1.1.27

5 years ago

1.1.26

5 years ago

1.1.25

5 years ago

1.1.24

5 years ago

1.1.23

5 years ago

1.1.22

5 years ago

1.1.21

5 years ago

1.1.20

5 years ago

1.1.19

5 years ago

1.1.18

5 years ago

1.1.17

5 years ago

1.1.16

5 years ago

1.1.15

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago