-
How to translate? |
Beta Was this translation helpful? Give feedback.
Answered by
sa-si-dev
Sep 1, 2021
Replies: 1 comment
-
You can do translation by initiating the Virtual Select with all text-related properties (Refer Text Properties for available properties) To avoid code duplicates, create a project-level util function to initiate the dropdown, and define all Text Properties there. function initDropdown(options) {
return VirtualSelect.init(Object.assign({
placeholder: 'Select',
noOptionsText: 'No options found',
/** define all text related properties and project-level common properties here */
}, options));
}
initDropdown({
ele: '#sample-select',
options: [
{ label: 'Options 1', value: '1' },
{ label: 'Options 2', value: '2' },
{ label: 'Options 3', value: '3' },
],
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sa-si-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do translation by initiating the Virtual Select with all text-related properties (Refer Text Properties for available properties)
To avoid code duplicates, create a project-level util function to initiate the dropdown, and define all Text Properties there.