Chips | placeholder prop
parent
62f45a7622
commit
8ff6f37f54
|
@ -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",
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue