rniemeyer / knockout-sortable

A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality
MIT License
547 stars 128 forks source link

problems with commiting data using sortable #146

Closed wakaguaka closed 9 years ago

wakaguaka commented 9 years ago

Hello all, I have a fiddle in which can reproduce the problem: http://jsfiddle.net/wakaguaka/6dtxy0mw/ I am able to move the rows around, delete them, but if I want to change a value it will not pass (by clicking with the mouse apply- "Aceptar"). But if you change any value and you move to the apply button just but hitting TAB and when the button is focused and press ENTER, the data is committed properly.

Is there a workaround in this scenario? I need to use knockout 2.3 because in edit mode the values are properly setup meanwhile in knockout 3.3 the initial edit values are in blank. I couldnt figure this out either...

Thank you for time

rniemeyer commented 9 years ago

One solution would be to use valueUpdate: 'afterkeydown' (or in latest KO the textInput binding). Here is a sample: http://jsfiddle.net/rniemeyer/bcjjn9w9/