arrow&v
Membership Level
Annual Membership Fee
Language
Population
Classification
Annual Membership Fee

import wixData from 'wix-data';

 

let debounceTimer;

export function search_keyPress(event) {

    if (debounceTimer) {

        clearTimeout(debounceTimer);

        debounceTimer = undefined;

    }

    debounceTimer = setTimeout(() => {

        filter($w('#search').value);

    },200);

}

 

let lastFilterSearch;

function filter(search) {

    if (lastFilterSearch !== search) {

        $w('#dataset1').setFilter(wixData.filter().contains('title',search));

        lastFilterSearch = search;

    }

}

 

$w.onReady(function () {

  $w("#dataset1").onReady( () => {

    $w("#repeater1").onItemReady( ($item, itemData, index) => {

      let theItem = itemData.excerpt;

      var title = theItem.substr(0,159);

      $item("#title").text = title + " . . . ";

    });

  } );

});