Issue
I'm using Ionic 7 and React 18. I have constructed these Ionic breadcrumbs ...
<IonBreadcrumbs>
<IonBreadcrumb {...(isSenderCompleted() ? { href: '#sender' } : {})}>Sender</IonBreadcrumb>
...
</IonBreadcrumbs>
with the intention being that if someone clicks one of the breadcrumbs, only the hash portion of the URL changes. However, the above doesn't accomplish this -- it seems to interpret the hash as a full URL.
Solution
Turns out to properly have the hash switched out in the URL, I shouldn't have used "href", but rather "routerLink", e.g.
<IonBreadcrumb>
{isSenderCompleted() ? <IonRouterLink routerLink={`#sender`}>Sender</IonRouterLink> : <span>Sender</span>}
</IonBreadcrumb>
Answered By - Dave
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.