import wixData from 'wix-data';
export function button1_click(event, $w) {
//// Runs a query on the "Jobs" collection
wixData.query('Jobs')
// Query the collection for any items whose "Title" field contains
// the value the user entered in the input element
.contains('title', $w('#input1').value)
.find() // Run the query
.then(res => {
// Set the table data to be the results of the query
$w('#table1').rows = res.items;
});
}
$w.onReady(function () {
$w("#table1").columns = [{
"id": "col1",
"dataPath": "title",
"label": "title",
"width": 100,
"visible": true,
"type": "string",
}, {
"id": "col2",
"dataPath": "newField11",
"label": "Location",
"width": 100,
"visible": true,
"type": "string",
}];
});