Nicolas Stepien

Results 111 comments of Nicolas Stepien

Could you check if this fixes it on your end? ```patch -setGridWidth(clientWidth - (devicePixelRatio % 1 === 0 ? 0 : 1)); +setGridWidth(clientWidth - (devicePixelRatio === 1 ? 0 :...

Please do try my suggestion. >it isn't just a single pixel change. This is because a single pixel change will toggle the display of the scrollbar.

Let's go ahead with this fix instead then. Can you confirm that `setGridWidth(clientWidth - (devicePixelRatio === 1 ? 0 : 1));` doesn't fix it for you?

@ekeuus Do you want to update this PR to use `setGridWidth(clientWidth - (devicePixelRatio === 1 ? 0 : 2));` or should I apply this tweak myself?

https://github.com/adazzle/react-data-grid/commit/625fad550d7457612bea00af668787711fd3f518 We've ended up using the ResizeObserver's sizes, and tweaked how we handle `devicePixelRatio`, please let us know if it makes things better/worse/neither.

Looks like all we need is to instead list the layers in `src/style/core.ts` in a correct order: ```patch diff --git a/src/style/core.ts b/src/style/core.ts index 49289fb7..737f7d0b 100644 --- a/src/style/core.ts +++ b/src/style/core.ts @@...

I don't think we'll write a migration guide, too many things have been rewritten or changed. What I'd suggest is to install the new version using a different name and...

Looks like using [`flushSync`](https://reactjs.org/docs/react-dom.html#flushsync) can fix the issue in the "simple virtual list" example ```tsx onScroll={(e) => { flushSync(() => { setRange(calcVisibleStartAndEndIndex(e.target.scrollTop, 5)); }) }} ```

@goldmont this doesn't help me as I need to use `preventDefault()`

Using both does not fix it the underlying bug in React.