cloudflarearchive / backgrid

Finally, an easily stylable semantic HTML data grid widget with a Javascript API that doesn't suck.
http://backgridjs.com
MIT License
2.01k stars 325 forks source link

can not edit cell for second time #599

Closed aliabdzad closed 8 years ago

aliabdzad commented 9 years ago

hi ... my model is like this : userModel:{ _id:'', profile:{fitst_name:'',...}, ... }

and my columns is like :

columns:[
                {
                    name: "profile.first_name",
                    label: "name",
                     cell: Backgrid.Cell.extend({
                        render: function(){
                            this.$el.text(this.model.get("profile").first_name);
                            return this;
                        },                       
                        formatter: _.extend({}, Backgrid.SelectFormatter.prototype, {
                            fromRaw: function (formattedValue, model) {
                                return model.get("profile").first_name;
                            },
                            toRaw: function (formattedValue, model) {
                              return formattedValue ;
                            }
                          })  
                    }) 
                }
]

everything is ok and my model update successfully but problem is that when i edit a cell then i can't edit it again until i refresh page . is it wrong my way ?

wyuenho commented 8 years ago

Backgrid does not support nested data by default. You have to look at the devtools console and see what errors are there. I can't debug it for you.