Open zhang-xiao opened 7 years ago
@zhang-xiao @4ver what kind of api do you like?
like passing a prop fetch
?
http://element.eleme.io/#/en-US/component/input#autocomplete
<el-autocomplete
class="inline-input"
v-model="state2"
:fetch-suggestions="querySearch"
placeholder="Please Input"
:trigger-on-focus="false"
@select="handleSelect"
></el-autocomplete>
+1 on this. Couldn't you just get away with throwing an $emit
on the open trigger and then we can create a method to get and populate members
@Minasokoni nice idea! Didn't see such a way in other framworks like Element-UI. Did you see this feature in other places?
@Minasokoni added $emit('at')
, but not published yet, try
npm i -S "git+https://github.com/fritx/vue-at.git#feat/emit-at-build"
<at :members="members" @at="handleAt"></at>
<script>
// ...
async handleAt (chunk) {
this.members = await fetchFromRemote(chunk)
}
</script>
The branch is buggy now, need more time to fix. @Minasokoni
@fritx no rush 👍 Thanks for the quick responses though
@Minasokoni you can try the branch now xD, just pushed.
Hey guys, 2.3.0 is out including this feature: emitting at
event.
for usage demo see above: https://github.com/fritx/vue-at/issues/16#issuecomment-332897002
However, it is not documented yet, and it is quite experimental for now, needs more test and fix.
The @at event doesnt work. I was able to change the :member but when I hit enter, the name dont appear on the text field.
What about your code? Did you bind v-model? @johnenrick
like giving suggestion items from server side when input @suggestion