From 8b538e7ce6fce5751b18ca598d4ce4aa7a588397 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Fri, 17 Apr 2020 22:44:26 +0300 Subject: [PATCH] Fixed #277 - Placeholder for Chips --- src/components/chips/Chips.d.ts | 1 + src/components/chips/Chips.vue | 6 +++++- src/views/chips/ChipsDoc.vue | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/chips/Chips.d.ts b/src/components/chips/Chips.d.ts index 3bb966dc5..ede04c530 100644 --- a/src/components/chips/Chips.d.ts +++ b/src/components/chips/Chips.d.ts @@ -7,6 +7,7 @@ export declare class Chips extends Vue { addOnBlur?: boolean; allowDuplicate?: boolean; separator?: string; + placeholder?: string; $emit(eventName: 'focus', event: Event): this; $emit(eventName: 'blur', event: Event): this; $emit(eventName: 'input', value: any[]): this; diff --git a/src/components/chips/Chips.vue b/src/components/chips/Chips.vue index 6097ace86..f83425d98 100644 --- a/src/components/chips/Chips.vue +++ b/src/components/chips/Chips.vue @@ -8,7 +8,7 @@
  • -
  • @@ -41,6 +41,10 @@ export default { allowDuplicate: { type: Boolean, default: true + }, + placeholder: { + type: String, + default: null } }, data() { diff --git a/src/views/chips/ChipsDoc.vue b/src/views/chips/ChipsDoc.vue index c3d037271..3676fae65 100644 --- a/src/views/chips/ChipsDoc.vue +++ b/src/views/chips/ChipsDoc.vue @@ -76,6 +76,12 @@ import Chips from 'primevue/chips'; string null Separator char to add an item when pressed in addition to the enter key. Currently only possible value is "," + + + placeholder + string + null + Specifies a short hint that describes the expected value of the input field.