Bladeren bron

:bug: 解决分页bug

zhanghe 6 jaren geleden
bovenliggende
commit
986860e229
1 gewijzigde bestanden met toevoegingen van 11 en 11 verwijderingen
  1. 11 11
      src/components/AXList/StandardTableList.js

+ 11 - 11
src/components/AXList/StandardTableList.js

@@ -10,16 +10,6 @@ function getSearchField(options) {
 }
 
 export default class StandardTableList extends PureComponent {
-  static defaultProps = {
-    keepUIState: {},
-    loading: false,
-    dataSource: [],
-    columns: [],
-    header: false,
-    footer: false,
-    showStatusSelect: true,
-    rowSelectable: true,
-  };
   static propTypes = {
     loading: PropTypes.bool,
     dataSource: PropTypes.array,
@@ -36,6 +26,16 @@ export default class StandardTableList extends PureComponent {
     rowSelectable: PropTypes.bool,
     keepUIState: PropTypes.object,
   };
+  static defaultProps = {
+    keepUIState: {},
+    loading: false,
+    dataSource: [],
+    columns: [],
+    header: false,
+    footer: false,
+    showStatusSelect: true,
+    rowSelectable: true,
+  };
   constructor(props) {
     super(props);
     const {
@@ -262,7 +262,7 @@ export default class StandardTableList extends PureComponent {
     this.setState({
       searchInputValue: value,
     }, () =>
-      this.handleFilterOperation({ [searchSelectKey]: value })
+      this.handleFilterOperation({ [searchSelectKey]: value, pageNo: 1 })
     );
   };
   // 刷新操作