react-resize-detector icon indicating copy to clipboard operation
react-resize-detector copied to clipboard

Return width according to provided observerOptions

Open moroine opened this issue 3 years ago • 3 comments

According to the documentation, we can pass ObserverOptions https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe

But when using box: 'border-box' the width returned by the hook is always contentBox

moroine avatar Nov 10 '22 14:11 moroine

Created a CodeSandbox of the issue:

https://codesandbox.io/s/nostalgic-dew-egxddl?file=/src/App.tsx

snelsi avatar Nov 10 '22 15:11 snelsi

Sounds as breaking change

Semigradsky avatar Nov 10 '22 19:11 Semigradsky

It could be an option to select the width to return

moroine avatar Nov 10 '22 20:11 moroine

Because this issue seems to have been inactive for quite some time now, I'm closing it as stale. If you're still encountering this bug in v10, feel free to reopen it.

snelsi avatar Mar 25 '24 09:03 snelsi