Could someone point me in the right direction for opening a page with a custom button?
The following code is close. It unfortunately opens /0/page/page_0//page_1/
<Button tag={Link} to="page_1" type="danger" size="sm" >
{this.props.intl.formatMessage({
id: "open_fac_details",
defaultMessage: defaultMessages.open_fac_details
})}
</Button>
And /page_1 reduces the entire url to http://server/page_1
To note, something like ?views=view_3 correctly open to the specific view
Solved! Go to Solution.
For reference, by diving into ExB source, I found how the LinkProps were defined and there is a LinkResult property that can be used to say "open a new page":
import { Button, Link } from "jimu-ui";
<Link target="_self" to={{
linkType: LinkType.Page,
value: "page_1"
}} >
<Button type="danger" size="sm" className="btn float-right" css={[reportBtn]} >
Open
</Button>
</Link>
Note the "page_1" is case sensitive. "Page_1" will not match.
For reference, by diving into ExB source, I found how the LinkProps were defined and there is a LinkResult property that can be used to say "open a new page":
import { Button, Link } from "jimu-ui";
<Link target="_self" to={{
linkType: LinkType.Page,
value: "page_1"
}} >
<Button type="danger" size="sm" className="btn float-right" css={[reportBtn]} >
Open
</Button>
</Link>
Note the "page_1" is case sensitive. "Page_1" will not match.