Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to get members list from remote request ? #16

Open
zhang-xiao opened this issue Jul 26, 2017 · 10 comments
Open

is it possible to get members list from remote request ? #16

zhang-xiao opened this issue Jul 26, 2017 · 10 comments

Comments

@zhang-xiao
Copy link

like giving suggestion items from server side when input @suggestion

@fritx fritx self-assigned this Sep 16, 2017
@fritx fritx mentioned this issue Sep 16, 2017
33 tasks
@fritx
Copy link
Owner

fritx commented Sep 23, 2017

@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>

@Minasokoni
Copy link

+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

@fritx
Copy link
Owner

fritx commented Sep 28, 2017

@Minasokoni nice idea! Didn't see such a way in other framworks like Element-UI.
Did you see this feature in other places?

fritx added a commit that referenced this issue Sep 28, 2017
could be used for remote request
@fritx
Copy link
Owner

fritx commented Sep 28, 2017

@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>

@fritx
Copy link
Owner

fritx commented Sep 28, 2017

The branch is buggy now, need more time to fix. @Minasokoni

@Minasokoni
Copy link

@fritx no rush 👍 Thanks for the quick responses though

fritx added a commit that referenced this issue Sep 29, 2017
could be used for remote request
fritx added a commit that referenced this issue Sep 29, 2017
could be used for remote request
@fritx
Copy link
Owner

fritx commented Sep 29, 2017

@Minasokoni you can try the branch now xD, just pushed.

@fritx
Copy link
Owner

fritx commented Oct 21, 2017

Hey guys, 2.3.0 is out including this feature: emitting at event.
for usage demo see above: #16 (comment)

However, it is not documented yet,
and it is quite experimental for now, needs more test and fix.

docs: https://fritx.github.io/vue-at/#/en/faq

@johnenrick
Copy link

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.

@fritx
Copy link
Owner

fritx commented Jun 21, 2019

What about your code? Did you bind v-model? @johnenrick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants