Sha256: 2722026d60abc07a1ab2e293cb281b05475d9a814f5d6f04425f635dd8209e67

Contents?: true

Size: 474 Bytes

Versions: 12

Compression:

Stored size: 474 Bytes

Contents

export default class PerPage {
  /**
   * Initializes the class in the context of an individual select element,
   * and bind its change event to submit the form it is contained within.
   * @param {jQuery} element the select element that this class represents
   */
  constructor(element) {
      this.form = element.parents('form')[0];

      // submit the form to cause the page to render
      element.on('change', (e) => {
          this.form.submit();
      });
  }
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
hyrax-2.0.3 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.2 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.1 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.0 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.0.rc3 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.0.rc2 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.0.rc1 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.0.beta5 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.0.beta4 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.0.beta3 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.0.beta2 app/assets/javascripts/hyrax/per_page.es6
hyrax-2.0.0.beta1 app/assets/javascripts/hyrax/per_page.es6