add id & placeholder props to AutoCompleteInput component

This commit is contained in:
Xiaofeng An 2019-02-08 11:02:28 -05:00
parent 128dcc637e
commit 17c70fc0ef
3 changed files with 7 additions and 1 deletions

View file

@ -3,9 +3,12 @@ import { take, filter, map } from 'lodash'
const AutoCompleteInput = {
props: [
'id',
'classObj',
'value',
'placeholder',
'autoResize',
'multiline',
'drop',
'dragoverPrevent',
'paste',

View file

@ -4,9 +4,10 @@
v-if="multiline"
ref="textarea"
:value="text"
:id="id"
@input="text = $event.target.value, $emit('input', $event.target.value), autoResize && resize($event)"
@click="setCaret"
@keyup="setCaret" :placeholder="$t('post_status.default')" rows="1" :class="classObj"
@keyup="setCaret" :placeholder="placeholder" rows="1" :class="classObj"
@keydown.down="cycleForward"
@keydown.up="cycleBackward"
@keydown.shift.tab="cycleBackward"

View file

@ -18,7 +18,9 @@
class="form-cw">
<auto-complete-input v-model="newStatus.status"
:classObj="{ 'form-control': true }"
:placeholder="$t('post_status.default')"
:autoResize="true"
:multiline="true"
:drop="fileDrop"
:dragoverPrevent="fileDrag"
:paste="paste"