This PR adds possibility to use relative sizes in combination with resizable panels. Only the difference from the default dimension is measured, which, when plugged in the calc function, results in only relative adjustments. This also fixes 2 issues:
issues where the panel is first rendered with 0 width, as that will immediately measure it and set as fixed
Issue where the layout would become irresponsive as a result of plugging this in, as all of the sizes would be in px.
This PR also lifts the current value from individual handlers to the main useResizeHandle hook, making sure that individual handlers don't keep their state and therefore don't conflict, it also makes sure that the current width is taken each time the resizing starts, further eliminating the potential disconnect between the internal state and DOM.
This PR adds possibility to use relative sizes in combination with resizable panels. Only the difference from the default dimension is measured, which, when plugged in the
calc
function, results in only relative adjustments. This also fixes 2 issues:This PR also lifts the current value from individual handlers to the main
useResizeHandle
hook, making sure that individual handlers don't keep their state and therefore don't conflict, it also makes sure that the current width is taken each time the resizing starts, further eliminating the potential disconnect between the internal state and DOM.