Replies: 1 comment 2 replies
-
|
Hi @nmarks99, Maybe you can bind the same variable to be the index of both container? This would force both to share the same "index", navigating in one would impact the other, causing the user to stay within the "same column". E.g turning: auto main_container = Container::Vertical({
Container::Horizontal({inp1, inp2}),
Container::Horizontal({inp3, inp4}),
});into: int column = 0;
auto main_container = Container::Vertical({
Container::Horizontal({inp1, inp2}, &column),
Container::Horizontal({inp3, inp4}, &column),
}); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I often encounter an issue where the cursor of an Input Component doesn't show visually when nested in several Containers. Here is a minimal example:
In this example I have 4 Input Components which I want to lay out in two rows of two. My motivation for using a Vertical container with two Horizontal containers inside is so keyboard navigation works as you'd expect. For example if focus is on inp1, then right arrow should move to inp2, and down arrow should move to inp3. Everything works as is except the Input cursor is not visible in many instances. Interestingly, if you focus and type something in inp1 or inp2 first before trying any other inputs, the cursor will show in all the inputs from then on as it should. However, if you use the inp3 or inp4 first, the cursor will not be shown.
Is this a bug or user error with how I am building my
main_containerwith Inputs in nested Containers?Beta Was this translation helpful? Give feedback.
All reactions