I am working with an array in my data:
data () {
return {
steps: [
{
disabled: this.someCheck
}
]
}
}
Additionally, I have a computed property:
computed: {
...mapGetters({
getFinishedSteps: 'jobFound/getFinishedSteps'
}),
someCheck () {
let x = true
for (const val of this.getFinishedSteps) {
if (val === ('address_information' || 'contact_information' || 'financiel_information' || 'identity_information')) {
x = false
}
}
return x
}
}
In the template section, I have included:
<ProgressContent
v-for="(step, n) of steps"
:key="n"
/>
To elaborate on the ProgressContent component:
props: {
step: {
type: Object,
default: () => ({
disabled: false
})
},
}
A challenge I am facing is passing the return value of the someCheck
computed property into the disabled
field in the data. However, when viewing the ProgressContent
component, the disabled
field appears to be empty.