Found solution:
function inputHandler (event) {
var query = event.detail.query;
var optionsArr = Array.prototype.slice.call(this.querySelectorAll('q2-option'));
optionsArr.forEach(function(option) {
alert(options.value);
});
}
Hello,
<q2-select label="Field Label" onClick={(e) =>console.log(e.target.value, 'value')}>
<q2-option value="1" display="Option 1"> Option 1 </q2-option>
<q2-option value="2" display="Option 2"> Option 2 </q2-option>
<q2-option value="3" display="Option 3" disabled> Option 3 </q2-option>
<q2-option value="4" display="Option 4"> Option 4 </q2-option>
</q2-select>
We can track the value of the dropdown options with the help of onClick event. We can get the value by logging "e.target.value". The above code snippet is an example.
Thanks,
Saikiran
Hey Alan,
Could you provide some more context with what the orginal issue was? Want to make sure we understand the problem.
Thanks!
— Jason Herbert 5 years agoHi Jason. The original issue was a result of trying to use JQuery/Javascript to pull the information. I'm still new to working with Tecton so once I read up more on the dropdown selects I was able to resolve my issue.
— Alan Perse 5 years ago