iTwin / iTwinUI-react

A react component library for iTwinUI.
https://github.com/iTwin/iTwinUI
Other
84 stars 23 forks source link

Resizable dialogs - retaining width & height #920

Closed jzbuchalski closed 1 year ago

jzbuchalski commented 1 year ago

Feature

Is it possible to provide say a unique id (per dialog), and have the width & height retained in local storage. Even session storage would be an improvement. Currently if you resize a dialog, close it, and reopen, it returns to the default width & height.

mayank99 commented 1 year ago

@JoeZman Can you provide a repro where it doesn't retain width and height? If you keep the Dialog in the react tree and use isOpen to toggle visibility, then it should retain its size.

https://user-images.githubusercontent.com/9084735/200854653-9efb7522-358e-432b-a56e-63d2045f0308.mov

jzbuchalski commented 1 year ago

Ok, I will test myself, I was in a demo call this morning, and noticed the dialogs were not retaining their values. I will investigate.

r100-stack commented 1 year ago

Ok, I will test myself, I was in a demo call this morning, and noticed the dialogs were not retaining their values. I will investigate.

Hi @jzbuchalski, just confirming, were you able to get it working? If not, could you give some more information/repro about the case in which the dialog doesn't retain the width and height?

jzbuchalski commented 1 year ago

Our dialogs are not always in the DOM, so we have a backlog item (in Design Review) to retain the state of dialogs in possibly local storage.

jzbuchalski commented 1 year ago

For our concerns, you can close this issue.