Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: hideSelected prop for v-select #2260

Merged
merged 1 commit into from Oct 20, 2017

Conversation

jacekkarczmarczyk
Copy link
Member

With hide-selected prop items that are selected are not listed
in the menu (and there is also no need to display checkbox on
in the menu)

Playground

<template>
  <v-app id="inspire">
    <main>
      <v-content>
        <v-container>
          <p style="font-size: 2em">Click the "Open dialog" button, click the select, type "I", press TAB</p>
          <v-btn @click="dialog = true">Open dialog</v-btn><v-btn @click="select = null">Clear value</v-btn>
          <v-checkbox label="Hide selected" v-model="hide"></v-checkbox>
          <v-dialog v-model="dialog">
            <v-card>
              <v-card-text>
                <v-select :items="items" chips tags v-model="select1" label="chips tags" :hide-selected="hide"></v-select>
                <v-select :items="items" tags v-model="select1" label="tags" :hide-selected="hide"></v-select>
                <v-select :items="items" tags multiple v-model="select1" label="tags multiple" :hide-selected="hide"></v-select>
                <v-select :items="items" v-model="select2" label="default select" :hide-selected="hide"></v-select>
                <v-select :items="items" v-model="select2" autocomplete label="autocomplete" :hide-selected="hide"></v-select>
                <v-select :items="items" v-model="select1" multiple label="multiple" :hide-selected="hide"></v-select>
                <v-select :items="items" v-model="select1" multiple autocomplete label="multiple" :hide-selected="hide"></v-select>
              </v-card-text>
            </v-card>
          </v-dialog>
        </v-container>
      </v-content>
    </main>
  </v-app>
</template>

<script>
export default {
  data() {
    return {
      hide: true,
      items: ['abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwy'],
      dialog: false,
      select1: [],
      select2: null
    };
  }
};
</script>

With hide-selected prop items that are selected are not listed
in the menu (and there is also no need to display checkbox on
in the menu)
@jacekkarczmarczyk jacekkarczmarczyk added the S: needs docs update The change requires an update to the documentation label Oct 20, 2017
@johnleider johnleider merged commit 3231d06 into vuetifyjs:dev Oct 20, 2017
@jacekkarczmarczyk jacekkarczmarczyk deleted the feat/hide-selected-prop branch October 21, 2017 01:05
@jacekkarczmarczyk jacekkarczmarczyk removed the S: needs docs update The change requires an update to the documentation label Oct 21, 2017
@lock
Copy link

lock bot commented Apr 15, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants