vue-tables-2
Version:
Vue.js 2 grid components
14 lines (11 loc) • 722 B
JavaScript
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
module.exports = function (e) {
var sendRequest = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
this.limit = _typeof(e) === 'object' ? e.target.value : e;
this.updateState('perPage', this.limit);
this.dispatch('limit', parseInt(this.limit));
if (sendRequest) {
this.setPage(1);
}
};
;