Layer index is reset when a route change (Configure, Key Tester ect...)
yadomi opened this issue · comments
Felix Yadomi commented
The layer index in the Configure tab is reset when navigating to another tab and going back to the Configure tab. This makes it cumbersome to quickly change a key and test it in the Key Tester.
The origin of the issue seems to come from this setLayer
here:
app/src/components/n-links/keyboard.tsx
Line 276 in d76f990
To reproduce the issue:
- Go to the Configure Tab
- Click on a layer in the Layer Control (e.g., pick layer 2)
- Go to any other tab (e.g.: pick Key Tester)
- Go back to the Configure tab
- ==> The layer is now reset to number 1
I'm not sure what the implication of the setLayer
call in keyboard.tsx is and what it does in the first place (I've tried to blame/search in commit history for a lead, with no luck).
Let me know if a PR is welcomed to remove it.
Felix Yadomi commented
#238 might be relevant to this issue