Perspective dropDown component event for selection

What is the event to catch for the selection of a new element on the dropdown component ?

onSelect is triggered when the list is open but I need to determine if the selected item change.

(multiSelect = false)

1 Like

Disregard this. I was working in Vision. Sorry.

The answer for vision

You can use a propertyChange event.

if event.propertyName=='selectedStringValue':
	print 'test' # or do something more useful

you can also use

if event.propertyName=='selectedValue':
	print 'a'

if you want to look at the integer value instead of the string.

onActionPerformed will fire when the dropdown makes a new selection - you can verify with system.perspective.print(self.props.value). You could also add a property change script to the value prop directly (just right click -> Add Change Script).