Making WordPress.org

Changeset 7454


Ignore:
Timestamp:
07/13/2018 12:10:21 AM (7 years ago)
Author:
coreymckrill
Message:

CampTix Attendance: Fix debounce on search input

Relocates the debounce call for the search function so that it works
correctly, preventing a new Ajax request from firing on every keystroke
in the search box in the Attendance UI.

Fixes #3711
Props dryanpress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-attendance/addons/assets/attendance-ui.js

    r919 r7454  
    274274                this.controller = options.controller;
    275275            }
    276 
    277             this.search = _.debounce( this.search, 500 );
    278276        },
    279277
     
    412410            this.$loading = this.$list.find( '.loading' );
    413411
    414             this.on( 'search', this.search, this );
     412            this.on( 'search', _.debounce( this.search, 350 ), this );
    415413            this.on( 'flush', this.flush, this );
    416414            this.on( 'more:toggle', this.moreToggle, this );
Note: See TracChangeset for help on using the changeset viewer.