Skip to content

Select option custom attribute #103

Answered by sa-si-dev
Sabyrzhanuly asked this question in Q&A
Discussion options

You must be logged in to vote

@Sabyrzhanuly you can set customData with options details and it would be returned on getSelectedOptions() method call.

VirtualSelect.init({
  ele: '#sample-select',
  options: [
    { label: 'Options 1', value: '1', customData: 'text' },
    { label: 'Options 2', value: '2', customData: 6 },
    { label: 'Options 3', value: '3', customData: { cv1: true } },
  ],
});

This feature is available in the release v1.0.26

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by sa-si-dev
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pjasminejeni
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
3 participants