Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Angular X-editable field to work with no buttons option (buttons=no)?

I would like to use the angular x-editable directive to work with a text field per the following

(a) I don't want to display buttons. I tried the buttons=no option but it does not seem to work with input of type text.

See the fiddle here.

(b) I want the underlying ng-model property to update immediately with each keystroke , without waiting for the user to focus out of the input. (as is default behavior with vanilla angular, eg. <input type=text ng-model="somepropertyname" />

How can one achieve (a) and (b) with angular x-editable? link to fiddle

like image 973
Jarnal Avatar asked Feb 11 '14 04:02

Jarnal


1 Answers

Answer to 1(a) is to add the blur="submit" attribute (in addition to buttons="no")

like image 144
Jarnal Avatar answered Nov 15 '22 19:11

Jarnal