Keep DataTable selected item highlighted

UI Components for React
Post Reply
Posts: 1
Joined: 09 Dec 2020, 05:15

09 Dec 2020, 05:21

Hello, coming from backend and lots of frameworks, it seems difficult for me to implement the thing described in the title :roll:
After a thorough research on search engines it seems that I cannot keep the selected item on the single selection DataTable.

I am using REDUX and I can see that my value coming from the store is persistent but I cannot assign it to the DataTable, what I did so far:

Code: Select all

                <DataTable value={this.props.projectsList} selectionMode="single" dataKey="id" selection={this.props.selProject} onSelectionChange={e => this.onRowSelect(e.value)}>
this.props.selProject , is a persistent value and it keep coming to the console and to various other components, absolute no issue with that.
I see the props on the DataTable but none of those seems to implement the "selected" row.

What I am missing? Is there any other component that I can use ?
Thanks a million <3

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests