1๐
โ
I think you are not using the ga
variable in data()
. Just correct it and options will be shown in the dropdown.
data() {
return {
baseUrl: 'https://example.com/hive/stats/bedrock',
game: '',
ga: ['dr', 'wars', 'hide', 'murder', 'sg'],
bg: '',
player: ''
}
}
EDIT: In your computed method url
you can add this:
if (this.game) {
url += this.baseUrl + `/${this.game}`
}
and for ui-select directive use :value.sync
instead of โv-model. Also if you need to listen to any changes then use
@input` method.
:value.sync="game"
Updated codepen link with working code:
https://codepen.io/sudheer-ranga/pen/vYNKmLZ
๐คSpiritOfDragon
Source:stackexchange.com