Chips | placeholder prop
parent
62f45a7622
commit
8ff6f37f54
|
@ -35,6 +35,12 @@ const ChipsProps = [
|
||||||
default: "false",
|
default: "false",
|
||||||
description: "When present, it specifies that the element should be disabled."
|
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",
|
name: "inputId",
|
||||||
type: "string",
|
type: "string",
|
||||||
|
|
|
@ -59,6 +59,10 @@ export interface ChipsProps {
|
||||||
* When present, it specifies that the element should be disabled.
|
* When present, it specifies that the element should be disabled.
|
||||||
*/
|
*/
|
||||||
disabled?: boolean | undefined;
|
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.
|
* 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>
|
<span class="p-chips-token-icon pi pi-times-circle" @click="removeItem($event, i)" aria-hidden="true"></span>
|
||||||
</li>
|
</li>
|
||||||
<li class="p-chips-input-token" role="option">
|
<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">
|
@focus="onFocus($event)" @blur="onBlur($event)" @input="onInput" @keydown="onKeyDown($event)" @paste="onPaste($event)" v-bind="inputProps">
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -44,6 +44,10 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
inputId: null,
|
inputId: null,
|
||||||
inputClass: null,
|
inputClass: null,
|
||||||
inputStyle: null,
|
inputStyle: null,
|
||||||
|
|
|
@ -83,6 +83,12 @@ import Chips from 'primevue/chips';
|
||||||
<td>false</td>
|
<td>false</td>
|
||||||
<td>When present, it specifies that the element should be disabled.</td>
|
<td>When present, it specifies that the element should be disabled.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>placeholder</td>
|
||||||
|
<td>string</td>
|
||||||
|
<td>null</td>
|
||||||
|
<td>Placeholder text for the input.</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>inputId</td>
|
<td>inputId</td>
|
||||||
<td>string</td>
|
<td>string</td>
|
||||||
|
|
Loading…
Reference in New Issue