Skip to content

Commit

Permalink
fix: steps array values should be ascending sorted
Browse files Browse the repository at this point in the history
Array.prototype.sort() default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.

Close #93
  • Loading branch information
flang authored and javier-godoy committed Jan 22, 2024
1 parent ffe6c4a commit 0660f1a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ import { Grid } from '@vaadin/grid/src/vaadin-grid.js';

_setResponsiveSteps : function(widths) {
const observer = grid.fcGridHelper._resizeObserver;
observer.widths=widths.sort();
observer.widths=widths.sort((a, b) => a - b);
observer.unobserve(grid);

if (widths.length>0) {
Expand Down

0 comments on commit 0660f1a

Please sign in to comment.