Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue 3: Can't use ios.position and android.position in ActionItem #1052

Open
mreall opened this issue Jun 26, 2023 · 2 comments
Open

Vue 3: Can't use ios.position and android.position in ActionItem #1052

mreall opened this issue Jun 26, 2023 · 2 comments
Labels
V3 Issues related to V3

Comments

@mreall
Copy link

mreall commented Jun 26, 2023

I'm following the instructions for setting the position of an ActionItem in the ActionBar for iOS. But when I include ios.position="right" in the ActionItem tag, the Android app crashes when I attempt to load that page. Here's the ActionBar code:

    <ActionBar>
      <NavigationButton visibility="collapsed" />
      <Label text="My Classes" class="font-bold text-lg" />
      <ActionItem :text="signedIn ? 'Sign Out' : 'Sign In'" ios.position="right" @tap="signInOut" />
    </ActionBar>

Any suggestions?

@mreall
Copy link
Author

mreall commented Jun 26, 2023

@vallemar provided the following workaround:

ios. and android. may not work for vue3. use isAndroid from @ns/core and do it like :position="isAndroid ? xxx : yyy"

@mreall
Copy link
Author

mreall commented Jun 26, 2023

Unfortunately iOS wasn't picking up the position using that workaround. But the following is working:

    <ActionBar>
      <NavigationButton visibility="collapsed" />
      <Label text="My Classes" class="font-bold text-lg" />
      <ActionItem v-if="isAndroid" :text="signedIn ? 'Sign Out' : 'Sign In'" android.position="actionBar"
        @tap="signInOut" />
      <ActionItem v-else :text="signedIn ? 'Sign Out' : 'Sign In'" ios.position="right" @tap="signInOut" />
    </ActionBar>

@rigor789 rigor789 added the V3 Issues related to V3 label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V3 Issues related to V3
Development

No branches or pull requests

2 participants