DEV: fix "addNavigationBarItem" documentation (#9207)

* the filter should return the boolean result
* custom href should return the relative url value
This commit is contained in:
Faizaan Gagan 2020-03-16 17:42:04 +05:30 committed by GitHub
parent 0c71f7bbd1
commit ef40b46611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -755,8 +755,8 @@ class PluginApi {
* displayName: "bugs"
* href: "/c/bugs",
* init: (navItem, category) => { if (category) { navItem.set("category", category) } }
* customFilter: (category, args, router) => { category && category.name !== 'bug' }
* customHref: (category, args, router) => { if (category && category.name) === 'not-a-bug') "/a-feature"; },
* customFilter: (category, args, router) => { return category && category.name !== 'bug' }
* customHref: (category, args, router) => { if (category && category.name) === 'not-a-bug') return "/a-feature"; },
* before: "top",
* forceActive(category, args, router) => router.currentURL === "/a/b/c/d";
* })