TabMenu breaks without Vue router

UI Components for Vue
Post Reply
Paul OS
Posts: 2
Joined: 19 Oct 2020, 17:10

19 Oct 2020, 17:28

The TabMenu component checks this.$route.path as below to see which tab to highlight as below but this breaks if you are not using the router.

Code: Select all

    computed: {
        activeRoute() {
            return this.$route.path;
        }
    },
This should be fixed so it doesn't break, and ideally there should be some other way of setting the active tab through a prop.

Paul OS
Posts: 2
Joined: 19 Oct 2020, 17:10

19 Oct 2020, 23:18

Also, because the route checking is

Code: Select all

            return this.activeRoute.startsWith(item.to);
it means that if the tabs have paths ['/', '/customer', '/customer-orders'] then navigating to /customer-orders highlights them all!

cagatay.civici
Prime
Posts: 18474
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

22 Oct 2020, 16:19

Sounds good, please create an issue ticket to use it with a prop, second one is fixed in 3.0.1;

http://www.primefaces.org/layouts/diamond-vue

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest