question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<B-Table> events for $router.push is not working in Nuxt

See original GitHub issue

Hello Guys,

I just found a weird behaviour related events in B-Table when directing to $router.push().

      <b-table
        :fields="table.fields"
        :items="table.items"
        bordered
        hover
        @row-clicked="$router.push({
          path: 'product/list'
        })"
      />

i got an error message like below image

But if i just insert nuxt-link tag somewhere in any slot, the event will work as expected

       <b-table
        :fields="table.fields"
        :items="table.items"
        bordered
        hover
        @row-clicked="$router.push({
          path: 'product/list'
        })"
      >
        <template v-slot:cell(index)="data">
          <nuxt-link to="product/list" />
        </template>
      </b-table>

Versions

Libraries:

  • BootstrapVue: 2.1.0
  • Bootstrap: 4.4.1
  • Nuxt : 2.10.2

Environment:

  • Device: Mac
  • OS: macOS Catalina
  • Browser: Chrome
  • Version: 78.0.3904.108

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jojowondercommented, Dec 18, 2019

Hi, as @tmorehouse mention, it will be release in v2.2.0 But currently, i achieve this using window.replace I don’t think my solution is the best, but you can try until the v2.2.0 is release

0reactions
tmorehousecommented, Jan 9, 2020

BootstrapVue v2.2.0 has been released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Push a route (Moving from vueJS to nuxtJS)
I am converting a VueJS project to Nuxt. js and I have a problem understanding how nuxt handles routing. Its documentation doesn't say...
Read more >
The router Property
The router property. The router property lets you customize Nuxt router. (vue-router ). base. Type: String; Default: '/'. The base URL of the...
Read more >
VueJS: $router.push not working with query parameters-Vue.js
Query parameters specified as a string do not work when passed to a path parameter: router.push({path: 'route?query=params'}).
Read more >
vue router push without reload - You.com | The AI Search ...
vue js router push not working. vue 3 router push not working ... This can be done with dedicated Vuex store, or simply...
Read more >
Silently Update URL in Nuxt 3 | Cody Bontecou
Update your URL using vue-router within Nuxt 3 so that your page does not refresh on variable change.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found