I created a component called MenuTab, and it’s being used in a page (i.e. HomePage).
In the home page I have a PageControl and I have added a couple of trigger animation on the one of the Page element, like the following. I am having problem in assigning the Move target, as the target is actually in the TabMenu component. Any idea on how to achieve this?
Am i structuring the component in the wrong way? I am just trying to component-ised the TabMenu, so I can re-use it.
it’s impossible to help you with seeing just the snippet you have posted. You need to share a minimal, self-contained, and complete reproduction of the UX you’ve tried to build.
Aside from that, looking at Fuse examples and finding some that deal with tab bar navigation should be a good starting point.
This is not a minimal, self-contained, and complete reproduction. It’s impossible to copy-paste and run it to see what’s going on because of missing component definitions.
Can you create a single UX file that holds everything (but is still minimal) starting with <App> tag and ending with </App>?
Before that, there’s very little to be said. Data contexts are limited to components and there’s ux:Dependency to work around the limitations.
With a lot of guessing, I came up with something that probably does what you intended to make. Also, this is what we generally mean by “a minimal, self-contained and complete reproduction” - something that you can copy-paste and run.
The main takeaway is that you refer to things in their data contexts. If you need to set a LayoutMaster on something, make sure it’s accessible. If that is not possible, use a ux:Dependency to inject the needed UX node.
I am trying to make the tab menu bar to move as i am dragging the page. if it make any sense. Trying to achieve it by adding animation trigger (ActivatingAnimation) at page2 (under page control).
Meanwhile, I am going to checkout the solution you post above.
if you want to link the indicator movement to the swiping motion of the pages, then that currently is a bit tricky to achieve. Using the approach in my example is definitely the suggested way for the time being.
If you desperately need that linked motion, I could help you make it work - find me on the Slack community under the handle @uldis.