openscopeproject / TrguiNG

Remote GUI for Transmission torrent daemon
GNU Affero General Public License v3.0
265 stars 32 forks source link

Improve horizontal scrolling performance of the headers row in tables #167

Closed jpovixwm closed 4 months ago

jpovixwm commented 4 months ago

demo It should be noted that toRefProxy and fromRefProxy are probably overkill, because they only make a difference if either the headers row or the torrent-table-rows container are re-mounted independently of each other, which I don't think could ever happen here. But it doesn't hurt to have this, as it makes makes the implementation a bit more future proof. The idea is that if e.g. the <Box> component was unmounted and re-mounted, it wouldn't receive the initial translate styles. This can be simulated by providing a key to the <Box> component; whenever the key changes, the old Box is destroyed, and a new one is mounted in its place, triggering the callback ref.