Use getSelectedItem in Crayons fw-select

I have tried to use this method with jQuery as you would use any other method but it didn’t work. Do you have a code snippet showing how to use this method with an fw-select?

Hi,
Essentially,

const getValue = async () => {
	const selectElm = $('#selectField')[0];
  const a = await selectElm.getSelectedItem();
  console.log(a);
}

Here is a JSFiddle that might help.

https://jsfiddle.net/4b9uhjfc/1/

Thanks.

2 Likes

Thanks Asif. Works perfectly. Its was the [0] on the element I was missing.

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.