Open tarasowski opened 2 years ago
I'm also having this issue with Svelte + RevoGrid wondering if this issue belongs in revolist/svelte-datagrid and if it's related to https://github.com/revolist/svelte-datagrid/issues/3
Same here with React using the RevoGrid's React component so it may be related to revo-grid itself
I'm also having this issue using vanilla js and the CDN. Code Sample
Hey folks, have anyone found a solution?
Did you try the next branch? Maybe it's fixed there
Here's what I've found from a little bit of testing.
npm run server
to spin up the demo.
✅ Sorting works correctlyFor reference here's what I changed /src/index.html
From
<script type="module" src="/build/revo-grid.esm.js"></script>
<script nomodule src="/build/revo-grid.js"></script>
To
<script src="https://unpkg.com/@revolist/revogrid@latest/dist/revo-grid/revo-grid.js"></script>
This link above resolves to v3.0.98 https://unpkg.com/@revolist/revogrid@3.0.98/dist/revo-grid/revo-grid.js
I verified that the file on the CDN is the same as the one produced by npm run build
I need to dig a little further to understand why but it looks as though npm run build
is not producing a file with the same functionality as in dev.
@tarasowski I had to go back several version to get it working. It seems a bug was introduced after 3.0.61. Using 3.0.61 solved it for me.
@revolist just wondering if you have any insight on why it might work in dev but not with the CDN version generated from npm run build
?
Thanks, @shatindle! It looks like an intelligent solution for now, but I'm running on 3.0.52 and the bug still exists.
@tarasowski are you using the npm package or cdn? 3.0.61 in the cdn doesn't have that issue. I didn't try version before that though
I'm using npm, but the issue was with svelte-grid, so I had to downgrade the revolist/revogrid to 3.0.61 and it started working for me.
This is caused by the incorrect build result for esm-es5.
https://github.com/revolist/revogrid/blob/4df18a24ee9660c6ab485804dbb621c0ad668bfd/src/plugins/sorting/sorting.plugin.ts#L179 For esm-es5, the build result is as follows.
return __spreadArray([],Array(e.length).keys(),true)}
It returns empty array because __spreadArray of tslib doesn't support Iterator generated by keys()
function.
I switched to using the build for ES2017 and the issue was solved.
I have the same problem using version 3.6.16, using npm instalation. When I change the @revolist/revogrid version on package.json to 3.0.98, it was fix.
Bug still exists for anyone who ends up here
I was using RevoGrid in vanilla JS
For me it worked when in Index.html I changed
<script src="https://cdn.jsdelivr.net/npm/@revolist/revogrid@latest/dist/revo-grid/revo-grid.js"></script>
to
<script src="https://cdn.jsdelivr.net/npm/@revolist/revogrid@3.0.61/dist/revo-grid/revo-grid.js"></script>
When sorting the data disappears after two sorts. Please see the attached animated gif.
I'm using Svelte + Revo grid. "@revolist/revogrid-column-date": "^1.1.0", "@revolist/revogrid-column-numeral": "^1.0.2", "@revolist/revogrid-column-select": "^2.0.2", "@revolist/svelte-datagrid": "^3.0.52", "svelte": "^3.29.7",
It doesn't matter which column I sort, the sorting on any column just removes the data from the table.
Thanks in advance, Dimi