com.vaadin.flow.router.
Class HighlightConditions
A set of predefined HighlightCondition
s.
Since:
1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C extends HasElement>
HighlightCondition<C>always()
Always highlight.
static HighlightCondition<RouterLink>
Highlight if the navigation path starts with the target
RouterLink
path.static <C extends HasElement>
HighlightCondition<C>locationPrefix
(String prefix) Highlight if the navigation path starts with
prefix
.static <C extends HasElement>
HighlightCondition<C>never()
Never highlight.
static HighlightCondition<RouterLink>
Highlight if the navigation path is the same as the target
RouterLink
.
-
Method Details
-
sameLocation
Highlight if the navigation path is the same as the target
RouterLink
.Returns:
the highlight condition
-
locationPrefix
Highlight if the navigation path starts with the target
RouterLink
path.Returns:
the highlight condition
-
locationPrefix
Highlight if the navigation path starts with
prefix
.Type Parameters:
C
- the target typeParameters:
prefix
- the prefix to match on the location pathReturns:
the highlight condition
-
always
Always highlight.
Type Parameters:
C
- the target typeReturns:
an always true highlight condition
-
never
Never highlight.
Type Parameters:
C
- the target typeReturns:
an always false highlight condition
-