Working Example
List to filter
Repeater: #repeater1
Code Examples
Background
Input: #filterText
Button: #filterButton
Button: #resetButton
Text: #itemCount
Number of List items:
2

Page Code
// For full API documentation, including code examples, visit http://wix.to/94BuAAs
import wixData from 'wix-data';
$w.onReady(function () {
//TODO: write your page related code here...
$w('#dataset1').onReady(() => {
updateCounterElement();
});
});
export function filterButton_click(event) {
//
let filterText = $w('#filterText').value;
if (filterText === '') {
filterText = 'ground';
$w('#filterText').value = filterText;
}
$w('#dataset1').setFilter(wixData.filter().contains('hoverTitle', filterText))
.then(() => {
updateCounterElement();
});
}
function updateCounterElement() {
$w('#itemCount').text = $w('#dataset1').getTotalCount().toString();
}
export function resetButton_click(event) {
$w('#dataset1').setFilter(wixData.filter())
.then(() => {
$w('#filterText').value = undefined;
$w('#filterText').resetValidityIndication();
updateCounterElement();
});
}