Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
Hide-selected in multiple components sharing the same items prop

So I basically have multiple v-select that all share the same :items prop. Now if an item is selected from one of the v-select, I want to hide it from all v-select so we can't choose it again. Inverse logic when the item is free again.

Is that possible?

<div v-for="(filter, index) in group.filterMeta" :key="index">
    <v-select
      v-model="filter.tag"
      :items="availableTags"
      :label="i18n('select.tag.label')"
    >
    </v-select>
</div>
@Component
export default class ManageGroupDialog extends Vue {
    ...
    /** Available tags */
    public availableTags = ['resource', 'resource_type', 'host', 'technology']
    ...
    public group: Group = {
        ...
        filterMeta: [
            {
                 tag: '',
                 value: '',
                 operator: ''
            }
        ]
        ...
    }
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you're working with multiple components looks like you need to start using Vuex. This way you can have a global state, and use the same items array in all your v-selects over your components.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!