GriddleGriddle / Griddle

Simple Grid Component written in React
http://griddlegriddle.github.io/Griddle/
MIT License
2.5k stars 377 forks source link

More than 8 columns display in an unexpected order #804

Open erinknight242 opened 6 years ago

erinknight242 commented 6 years ago

Griddle version

v.1.11.2

Expected Behavior

Columns will display in the order listed in the data (like it does for <=8 columns)

Actual Behavior

Columns appear in an unexpected order (7, 8, 9, 1, 2, 3, 4, 5, 6)

Steps to reproduce

Follow the Getting Started example, but with data with >8 columns:

<Griddle
  data={[
    { col1: '1', col2: '2', col3: '3', col4: '4', col5: '5',
      col6: '6', col7: '7', col8: '8', col9: '9'}
  ]}
  plugins={[plugins.LocalPlugin]}
/>
dahlbyk commented 6 years ago

Interesting. I would expect this to have been fixed by https://github.com/GriddleGriddle/Griddle/pull/658/commits/3a742520cdb67bb40b97fd55b70dc5ad46404b62 in https://github.com/GriddleGriddle/Griddle/pull/658.

Can you please try the new story added in #805? I'm not able to reproduce this. image

erinknight242 commented 6 years ago

Agree; interesting. The storybook columns look correct for me as well; not sure why v1.11.2 installed in my app isn't working properly. I'll try to repro elsewhere.

erinknight242 commented 6 years ago

Ok; I was able to repro it. It seems to be related to my (rather undesirable) column names, which are formatted like a mm-dd date.

data={[
  { '00-00': '0', '01-01': '1', '02-02': '2', '03-03': '3', '04-04': '4',
    '05-05': '5', '06-06': '6', '07-07': '7', '08-08': '8', '09-09': '9', '10-10': '10' }
]}
screen shot 2018-04-04 at 7 54 29 am
dahlbyk commented 6 years ago

Confirmed. No idea why. I just pushed a failing test to #805, if you care to look into what the problem may be in dataSelectors.js.