vitalets / angular-xeditable

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

Checkbox doesn't support JSON objects #772

Closed mochsner closed 3 years ago

mochsner commented 3 years ago

This may not be an issue with angular-xeditable itself, but rather related to AngularJS and it's use of state for ng-model.

Still, while I investigate, I wanted to open this as I look into the cause of Checkboxes not showing up (before being edited), as I think this should be a feature that's adopted natively by this library, and potentially even noted in the documentation (if able to get it working.

See below for example of a checkbox, prior to being edited by xeditable.

Working, with users JS objects: http://jsfiddle.net/mochsner/mzb64j0w/3/

    {'id': 1, 'name': 'awesome user1', 'status': 2, 'group': 4, groupName: true},
    {'id': 2, 'name': 'awesome user2', 'status': 1, 'group': 3, groupName: false},
    {'id': 3, 'name': 'awesome user3', 'status': 2, 'group': 2, groupName: false}

image

Not working, with users JSON

    {'id': 1, 'name': 'awesome user1', 'status': 2, 'group': 4, 'groupName': 'true'},
    {'id': 2, 'name': 'awesome user2', 'status': 1, 'group': 3, 'groupName': 'false'},
    {'id': 3, 'name': 'awesome user3', 'status': 2, 'group': 2, 'groupName': 'false'}

image

mochsner commented 3 years ago

Closing, as this is strictly relatd to AngularJS' implementation of ng-model.