i have 2 select fields:
first field:
ns-dropdown-item(item-id="6")
ns-select(:placeholder="$t('users.role')", v-model="newLeader.role",
:options="roleOptions", @change="activeIfCoororMan")
second field is disable
ns-dropdown-item(item-id="7")
ns-select(:placeholder="$t('users.client')", v-model="client",
:options="clients", :disabled="true")
this is my vue data:
export default {
template: template(),
data() {
return {
newLeader: null,
client: null,
clients: [],
errors: {},
roleOptions: [
{value: 'coordinator', label: this.$t('users.roleOptions.coordinator')},
{value: 'manager', label: this.$t('users.roleOptions.manager')},
{value: 'leader', label: this.$t('users.roleOptions.leader')},
{value: 'leader_admin', label: this.$t('users.roleOptions.leader_admin')}
]
};
},
methods: {
activeIfCoororMan() {
if(this.newLeader.role === 'manager' || this.newLeader.role === 'coordinator') {
console.log("remove-disabled")
} else {
console.log("stay-disabled")
}
},
}
}
when i'm choosing in first select coordinator or manager, i can see in console: remove-disable. But, i would like change :disable attribute from second field to false.
Thank you