I've got a table populated from a search. Now I would like for the user to be able to click the row and be directed to a dynamic item page based on the results of the search. Is this possible?
My current code.
import wixData from 'wix-data';
$w.onReady(function () {
});
export function searchButton_onClick(event) {
wixData.query('Members')
.contains('birthday', $w('#textInput1').value)
.or(wixData.query('Members').contains('name', $w('#textInput1').value))
.or(wixData.query('Members').contains('spouse', $w('#textInput1').value))
.find()
.then(res => {
$w('#table2').rows = res.items;
});
}
Thanks
How would you do this? If I link the table to a dataset it gets populated before I do the search. I'm wanting the table to be blank until the search is completed and then be linked to the dynamic page. I like the idea of the onRowSelect event but not sure how to word it to link to the dynamic page. Thanks
There are two ways to make it work
1. you can add a link in the table, and set the values in the links to the dynamic page.
2. you can set the table to a row selection mode, and using the onRowSelect event navigate to the appropriate page. To get the right experience you probably want to set the row background hover and selection colors.