vitalets / angular-xeditable

Edit in place for AngularJS
http://vitalets.github.io/angular-xeditable
MIT License
1.91k stars 403 forks source link

How to implement typeahead-loading? #486

Closed chedched closed 8 years ago

chedched commented 8 years ago

I'm trying to show a spinner when there is data being fetched in a typeahead. Bootstrap comes with a function for this: typeahead-loading. I didn't see that anywhere in the code, so I guess that's not part of angular-xeditable (yet).

What is the most intelligent way to implement this? There is a discussion about something quite similar here: https://github.com/vitalets/angular-xeditable/issues/478. However, I don't see how I could alter the templates of typeahead - I can't find them in the code at all. Can anyone give me a hint?

ckosloski commented 8 years ago

Did you try adding e-typeahead-loading to your input?

chedched commented 8 years ago

Yes, it didn't work. But as said, I can't see anything like that in the code, so I think that functionality is just not implemented.

ckosloski commented 8 years ago

There is nothing specifically implemented for the typeahead element in this project. Do you have a Plunkr or JSFiddle showing your issue?

chedched commented 8 years ago

I just created one: http://plnkr.co/edit/l4ewWsVvvAg1OabXm2c3?p=preview. You can see the non-working xeditable at the top and the working typeahead without xeditable at the bottom.

ckosloski commented 8 years ago

Here is a working fiddle

It seems to want a "full" object i.e. user.loading

chedched commented 8 years ago

Yes, that's the solution. Thank you so much for your help, I really appreciate it.

ckosloski commented 8 years ago

Sure, np. You can go ahead and close this issue.