Created
April 20, 2018 21:53
-
-
Save JMWebDevelopment/d0b5f9d5042093985aaab9c513dfe16e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onSelectTeam( option ){ | |
console.log('change team'); | |
if( option === null ){ | |
console.log(null); | |
getTeams().then( function( options ) { | |
console.log(options); | |
setAttributes({ | |
team_id: "", | |
team_string: "", | |
getTeam: false, | |
teams: options | |
}); | |
}); | |
} else { | |
console.log('There is an option'); | |
getTeams().then( function( options ) { | |
console.log(options); | |
setAttributes({ | |
team_id: option.value, | |
team_string: option.label, | |
getTeam: true, | |
teams: options | |
}); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment