MCPcopy Create free account
hub / github.com/AllenFang/react-bootstrap-table / getTableData

Function getTableData

src/BootstrapTable.js:136–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134 }
135
136 getTableData() {
137 let result = [];
138 const { options, pagination } = this.props;
139 const sortName = options.defaultSortName || options.sortName;
140 const sortOrder = options.defaultSortOrder || options.sortOrder;
141 const searchText = options.defaultSearch;
142
143 if (sortName && sortOrder) {
144 this.store.setSortInfo(sortOrder, sortName);
145 if (!this.allowRemote(Const.REMOTE_SORT)) {
146 this.store.sort();
147 }
148 }
149
150 if (searchText) {
151 this.store.search(searchText);
152 }
153
154 if (pagination) {
155 let page;
156 let sizePerPage;
157 if (this.store.isChangedPage()) {
158 sizePerPage = this.state.sizePerPage;
159 page = this.state.currPage;
160 } else {
161 sizePerPage = options.sizePerPage || Const.SIZE_PER_PAGE_LIST[0];
162 page = options.page || 1;
163 }
164 result = this.store.page(page, sizePerPage).get();
165 } else {
166 result = this.store.get();
167 }
168 return result;
169 }
170
171 getColumnsDescription({ children }) {
172 let rowCount = 0;

Callers

nothing calls this directly

Calls 6

setSortInfoMethod · 0.80
isChangedPageMethod · 0.80
getMethod · 0.80
pageMethod · 0.80
sortMethod · 0.45
searchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…