Hello All,
I am using the prime react datatable with reactJS,
The selection is set to 'Single' and we have a master detail structure on page.
On load or search, Is there way we can set first row as default selected row on master table, so the child is populated according to the first row in master.
Thanks in advance,
Abhilash
Make a default row selection in prime react datatable
Yes instead of defaulting your selection to NULL.
Default it to the row you want selected.
Code: Select all
const [selectedProduct1, setSelectedProduct1] = useState(null);
Code: Select all
const [selectedProduct1, setSelectedProduct1] = useState(mySelectedProduct);
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Posts: 2
- Joined: 08 Aug 2023, 06:03
It is selecting the first row on page load,
But the key support is not working.
It is not focusing on the other rows until and unless we click on any row int the DataTable.
How to achieve that functionality.
But the key support is not working.
It is not focusing on the other rows until and unless we click on any row int the DataTable.
How to achieve that functionality.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 11 guests