Chips | placeholder prop

pull/2862/head
Tuğçe Küçükoğlu 2022-08-12 15:03:33 +03:00
parent 62f45a7622
commit 8ff6f37f54
4 changed files with 21 additions and 1 deletions

View File

@ -35,6 +35,12 @@ const ChipsProps = [
default: "false",
description: "When present, it specifies that the element should be disabled."
},
{
name: "placeholder",
type: "string",
default: "null",
description: "Placeholder text for the input."
},
{
name: "inputId",
type: "string",

View File

@ -59,6 +59,10 @@ export interface ChipsProps {
* When present, it specifies that the element should be disabled.
*/
disabled?: boolean | undefined;
/**
* Placeholder text for the input.
*/
placeholder?: string | undefined;
/**
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
*/

View File

@ -10,7 +10,7 @@
<span class="p-chips-token-icon pi pi-times-circle" @click="removeItem($event, i)" aria-hidden="true"></span>
</li>
<li class="p-chips-input-token" role="option">
<input ref="input" type="text" :id="inputId" :class="inputClass" :style="inputStyle" :disabled="disabled || maxedOut"
<input ref="input" type="text" :id="inputId" :class="inputClass" :style="inputStyle" :disabled="disabled || maxedOut" :placeholder="placeholder"
@focus="onFocus($event)" @blur="onBlur($event)" @input="onInput" @keydown="onKeyDown($event)" @paste="onPaste($event)" v-bind="inputProps">
</li>
</ul>
@ -44,6 +44,10 @@ export default {
type: Boolean,
default: true
},
placeholder: {
type: String,
default: null
},
inputId: null,
inputClass: null,
inputStyle: null,

View File

@ -83,6 +83,12 @@ import Chips from 'primevue/chips';
<td>false</td>
<td>When present, it specifies that the element should be disabled.</td>
</tr>
<tr>
<td>placeholder</td>
<td>string</td>
<td>null</td>
<td>Placeholder text for the input.</td>
</tr>
<tr>
<td>inputId</td>
<td>string</td>