akottr / dragtable

re-order table columns by using drag'n'drop
http://akottr.github.io/dragtable
MIT License
203 stars 166 forks source link

reduced int parsing to persistObj[n] in _restoreState function #34

Closed oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxo closed 9 years ago

oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxo commented 9 years ago

Comment above _restoreState function suggests that persist object is something like: {'id1':'2','id3':'3','id2':'1'} where column indexes are strings. This causes error 'TypeError: b is undefined' because for 'id1' it concatenates string index '2' with 1 getting '21' which is parsed to 21 instead of 2+1=3 and so on... please apply this fix or change example persist object in comment above _restoreState to {'id1':2,'id3':3,'id2':1}

akottr commented 9 years ago

Thanks :+1: