@diavele
And the only thing now you want to do is that when the user types something
the repeater collapses while typing,
when done the repeater can expand again?
@volkaertskristof if the text value is null the repeater must be collapsed. if value is “title” (hero name) repeater must expand to show the result.
Oke so not showing when only part is typed?
I got this far with you, i will help till evrything works
Past the code you have now,
I’ll try to change it the way it should work then
@volkaertskristof This worked. It solved everything.
$w.onReady(function () {
$w("#dataset1").onReady( () => {
} );
});
//search bar
import wixData from 'wix-data';
let debounceTimer;
export function input1_keyPress(event) {
if (debounceTimer) {
clearTimeout(debounceTimer);
debounceTimer = undefined;
}
debounceTimer = setTimeout(() => {
filter($w('#input1').value);
}, 0);
}
let lastFilterTitle;
function filter() {
$w('#dataset1').setFilter(
wixData.filter()
.contains("title", $w("#input1").value)
.and( wixData.filter()
)
);
if($w("#input1").value === ""){
$w("#repeater1").collapse()
} else {
$w("#repeater1").expand()
}
}
@diavele ah good to hear!
If you have any other question
Don’t hesitate to ask.