Hello.
I want that if I put “0” or if a space in my database is “empty” Dont appear.
My code:
import wixData from ‘wix-data’ ;
export function btnSearch1_click_1(event) {
filterCasas();
}
function filterCasas(){
$w( “#propertiesDataset” ).setFilter(wixData.filter()
.contains( 'propertieType' , $w( '#dropdown11' ).value)
.between( 'bedrooms' , parseFloat($w( '#dropdown33' ).value), parseFloat($w( '#dropdown66' ).value))
.between( 'pricefilter' , parseFloat($w( '#dropdown44' ).value), parseFloat($w( '#dropdown55' ).value))
)
//.then((results) => {
// console.log(‘Dataset is now filtered’);
if ($w( ‘#propertiesDataset’ ).getTotalCount() !== 0 ) {
console.log( ‘Showing Results!’ );
$w( ‘#propertiesRepeater’ ).expand();
console.log($w( ‘#propertiesDataset’ ).getItems());
} else {
$w( ‘#propertiesRepeater’ ).collapse();
console.log( ‘No Results…’ );
}
// }).catch((err) => {
// console.log(err);
// });
//$w(“#propertiesRepeater”).expand();
}
My code