[reload all items when clear button clicks]
But fail. Please comment.
error in line 25,27 &28
export function button28_click() {
//Reload all items when clear button clicks:
wixData.query(‘agentprofile’)
.find()
.then(res=>{
$w(’ #repeater1 ‘).data=res.items;
$w(’ #button28 ').text= “agentprofile = ALL”;
})
.catch{(err)=>{
let errorMsg=err;
}}
}
Hi,
You have some syntax mistakes,
export function button28_click() {
//Reload all items when clear button clicks:
wixData.query('agentprofile')
.find()
.then(res=>{
$w('#repeater1').data=res.items;
$w('#button28').text= "agentprofile = ALL"; // there is not text attribute to this element. I guess you mean label
})
.catch(err=>{
let errorMsg=err;
})
For more information:
Good luck!
Roi.