smartSelect - not working to close when I select item

app -

var smartSelect = myApp.smartSelect.get(’.smart-select’);

$$(’#form_entry_item’).on(‘change’, function(smartSelect) {
console.log(‘changed!’);
smartSelect.close;
});

html

All 1 2
Filter

You should call as method:
smartSelect.close()

I change to smartSelect.close() and it still display- TypeError: smartSelect.close is not a function. What is the reason?

Means myApp.smartSelect.get(’.smart-select’); doesn’t return you smart select instance, you pass wrong selector there or in wrong place/time

1 Like

thank you. I change to right place…working

			$$('#form_entry_item').on('change', function() {
				//console.log('Form entry item was changed was changed!');
				var smartSelect = myApp.smartSelect.get('.smart-select');
				smartSelect.close();
			})
1 Like