From 168a8e3f932c1200dfb6733615c2eac42810b9cf Mon Sep 17 00:00:00 2001 From: Josh McCullough Date: Thu, 31 Jan 2019 12:09:29 -0500 Subject: [PATCH] update fireFetchData to use current state for select value (#1231) --- src/methods.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/methods.js b/src/methods.js index 3e4144b..4836b97 100644 --- a/src/methods.js +++ b/src/methods.js @@ -331,7 +331,15 @@ export default Base => } fireFetchData () { - this.props.onFetchData(this.getResolvedState(), this) + // determine the current state, preferring certain state values over props + const currentState = { + ...this.getResolvedState(), + page: this.getStateOrProp('page'), + pageSize: this.getStateOrProp('pageSize'), + filter: this.getStateOrProp('filter'), + }; + + this.props.onFetchData(currentState, this) } getPropOrState (key) {