[SOLVED] How do I use smart select in a popup in Vue? (f7, v2)

I’m trying to use a smart select in a popup. On my first try I get an error:

Error in mounted hook: "Error: Smart Select requires initialized View"

When I put my content in this:

  <f7-popup id="assign-badge-popup" tablet-fullscreen @popup:open="resetPopup">
    <div class="popup-inner view view-init">
    </div>
  </f7-popup>

I get an error

Error in event handler for "click": "TypeError: Cannot read property '$vnode' of undefined"

found in

    ---> <F7Link>
           <F7Card>
             <F7Tab>
               <GeneralTab> at src/components/tabs/badges/general-tab.vue
                 <F7Tabs>
                   <F7Tab>
                     <BadgesTab> at src/components/tabs/badges/badges-tab.vue
                       <F7Tabs>
                         <F7Page>
                           <Home> at src/pages/home.vue
                             <F7View>
                               <App> at src/app.vue
                                 <Root>

I don’t really get that last one because the general tab is not a child of an f7-link.

Please help :slight_smile:

Ok so I found a solution, I need to add the param view with $f7.views.main.

1 Like