Open sqbell opened 9 years ago
I use BIP to edit strings that look like so: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]. When I click on a field to edit it, Sun,Mon,Tue,Wed,Thu,Fri,Sat is displayed though. When I click away, this is what is sent to the server.
["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
Sun,Mon,Tue,Wed,Thu,Fri,Sat
The problem is that reading from data-bip-original-content (https://github.com/bernat/best_in_place/blob/master/lib/assets/javascripts/best_in_place.js#L202) with .data() method parses the string into JS array.
data-bip-original-content
.data()
Is there any way to keep working with a string instead of having it parsed as an array?
Facing the same issue...
I use BIP to edit strings that look like so:
["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
. When I click on a field to edit it,Sun,Mon,Tue,Wed,Thu,Fri,Sat
is displayed though. When I click away, this is what is sent to the server.The problem is that reading from
data-bip-original-content
(https://github.com/bernat/best_in_place/blob/master/lib/assets/javascripts/best_in_place.js#L202) with.data()
method parses the string into JS array.Is there any way to keep working with a string instead of having it parsed as an array?