Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
Tecton dropdown select issues

Tecton dropdown select option values are 'undefined' when form loads. They have values. How can I get around this to find an option by value?

Posted 5 years ago
0

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 ago
0

Hi 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
Votes Newest

Answers 2


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

www.nuevesolutions.com

154 Views
2 Answers
5 years ago
5 years ago
Tags