Comments (6)
Thanks for posting. The hand off between rhandsontable
and htmlwidgets
isn't working as expected, so I've posted an issue with that project as well.
from rhandsontable.
I think changing this line to be explicit and follow ordering specified by x.colHeaders
will be a more robust way to handle.
toArray(x.data.map(function(d){return x.colHeaders.map(function(ky){return d[ky]})}))
from rhandsontable.
Thanks, your suggestion fixes the problem and is more robust.
It appears to me that the column reordering is happening outside of the toArray
call, as in the js debugger I see the x.data
obj passed to toArray
already has an incorrect order. It seems that js is reordering the obj values.
> x.data[0]
<- Object {4: 1, 6: 3, 8: 14, vs: 0}
Just trying to understand why this is occurring so I can prevent future bugs. Thanks again for the help.
from rhandsontable.
I should in bold say I am not a definitive source but I recall seeing in multiple places that order of keys is not assured in JavaScript objects. Here is one StackOverflow post that seems to be more authoritative than me.
from rhandsontable.
Thanks for the link. I checked in a fix, but please re-open if you still run into issues.
from rhandsontable.
If I remember correctly, the reordering occurs only when the keys are numbers.
from rhandsontable.
Related Issues (20)
- Put in red cells modified
- NULL input for rhandsontable
- using colWidths argument produces duplicate columns HOT 2
- Option to replace the checkbox with fancier shinyWidget item ?
- How to deselect row? HOT 1
- Character column transformed to numeric in hot_to_r
- rhandsontable works locally, but flickering on cloud HOT 2
- Prevent auto arranging rows while editing with column sorting enabled
- Issue when more than 1 character in dropdown
- I did not find any document on Collapsing and expanding rows using rhandsontable in Rshiny. Or Do we even have this functionality? HOT 2
- Borders not updated
- hot_to_r fails to copy date data HOT 6
- Show different colHeaders than are used internally/in the code HOT 1
- Specifying a column type as numericInput with up/down arrows
- Custom dropdown menus
- How to enable paid features - formula support
- Potential conflict with dygraphs, moment.js
- `Download to CSV` function does not work if empty table values HOT 2
- Rhandsontable bouncing when processing a slow calculation
- Added rows repeat row name if initial data has only one row
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rhandsontable.