Feature Request - Add Link attribute to Button

UI Components for React
Post Reply
chrishj
Posts: 229
Joined: 11 Jul 2011, 21:58
Location: England, Lancashire
Contact:

11 May 2019, 12:15

Would it be possible to add a "Link to='./xxx' " to the button where Link is from react-router-dom?

This would integrate with the react routing when building SPA application. Currently, the button on supports href as the target I believe.
PrimeReact: 9.6.0
NextJs: 13.4.12
Theme Apollo v9.0
Database pg 8.8.0
react-hook-form: 7.38.0

Lola10
Posts: 1
Joined: 17 May 2019, 12:48

17 May 2019, 12:51

super(props);
let columns = [
{ field: "foo", header: "bar", sortable: true, sortFunction: this.mySort }
]
this.state = {
cols: columns
}
this.colOptions = [];
for (let col of this.state.cols) {
this.colOptions.push({ label: ` ${col.header}`, value: col });
})

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

24 Jun 2019, 10:48

Hi @chrishj,

Please examine https://stackoverflow.com/a/35354844. I think you can use these solutions.

Best Regards,

chrishj
Posts: 229
Joined: 11 Jul 2011, 21:58
Location: England, Lancashire
Contact:

06 Jul 2019, 00:55

Thanks for this.
I think it provides a redirect to the page instead of using the SPA react-router
PrimeReact: 9.6.0
NextJs: 13.4.12
Theme Apollo v9.0
Database pg 8.8.0
react-hook-form: 7.38.0

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests