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(MdChips): Support with field variants #1668

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/app/pages/Components/Chips/Chips.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default {
defaults: 'text'
},
{
name: 'md-placeholder',
name: 'placeholder',
type: 'String',
description: 'The input placeholder. It is useful to show to the user which type of data will be inserted.',
defaults: 'null'
Expand Down
13 changes: 7 additions & 6 deletions docs/app/pages/Components/Chips/examples/ChipCustomTemplate.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<template>
<div>
<md-chips v-model="projects" :md-limit="5" md-placeholder="Add project...">
<template slot="md-chip" slot-scope="{ chip }">
{{ chip }} <small v-if="chip === currentProject">(Marcos Moura)</small>
</template>

<md-field>
<md-chips v-model="projects" :md-limit="5" md-placeholder="Add project...">
<template slot="md-chip" slot-scope="{ chip }">
{{ chip }} <small v-if="chip === currentProject">(Marcos Moura)</small>
</template>
</md-chips>
<div class="md-helper-text">Up to 5 projects</div>
</md-chips>
</md-field>
</div>
</template>

Expand Down
17 changes: 11 additions & 6 deletions docs/app/pages/Components/Chips/examples/DuplicatedFeedback.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<template>
<div>
<md-chips class="md-primary" v-model="chips" md-placeholder="Add genre...">
<md-field>
<md-chips class="md-primary" v-model="chips" md-placeholder="Add genre..."></md-chips>
<div class="md-helper-text">Default</div>
</md-chips>
<md-chips class="md-primary shake-on-error" v-model="chips" md-placeholder="Add genre...">
</md-field>

<md-field>
<md-chips class="md-primary shake-on-error" v-model="chips" md-placeholder="Add genre..."></md-chips>
<div class="md-helper-text">Shake duplicated chip on insertion</div>
</md-chips>
<md-chips class="md-primary pulse-on-error" v-model="chips" md-placeholder="Add genre..." md-check-duplicated>
</md-field>

<md-field>
<md-chips class="md-primary pulse-on-error" v-model="chips" md-placeholder="Add genre..." md-check-duplicated></md-chips>
<div class="md-helper-text">Always pulse duplicated chip</div>
</md-chips>
</md-field>
</div>
</template>

Expand Down
4 changes: 3 additions & 1 deletion docs/app/pages/Components/Chips/examples/Editable.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<div>
<md-chips v-model="fruits" md-placeholder="Add fruit..."></md-chips>
<md-field>
<md-chips v-model="fruits" md-placeholder="Add fruit..."></md-chips>
</md-field>
</div>
</template>

Expand Down
12 changes: 7 additions & 5 deletions docs/app/pages/Components/Chips/examples/Format.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<template>
<div>
<md-chips class="md-primary" v-model="clubs" md-placeholder="Add club..." :md-format="toUppercase">
<md-field>
<label>La Liga Clubs</label>
<md-chips class="md-primary" v-model="clubs" :md-format="toUppercase"></md-chips>
<div class="md-helper-text">Three uppercase letters</div>
</md-chips>
<md-chips class="md-primary" v-model="artists" md-placeholder="Add artist..." :md-format="formatName">
</md-field>

<md-field>
<label>Artists</label>
<md-chips class="md-primary" v-model="artists" placeholder="Add artist..." :md-format="formatName"></md-chips>
<div class="md-helper-text">Try inserting `Eugène Ysaÿe`. The formatter will remove diacritics.</div>
</md-chips>
</md-field>
</div>
</template>

Expand Down
4 changes: 3 additions & 1 deletion docs/app/pages/Components/Chips/examples/Static.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<div>
<md-chips v-model="cities" md-static></md-chips>
<md-field>
<md-chips v-model="cities" readonly></md-chips>
</md-field>
</div>
</template>

Expand Down
Loading