Skip to content

Commit

Permalink
ver. 1.12.22
Browse files Browse the repository at this point in the history
  • Loading branch information
光弘 committed Apr 7, 2017
1 parent 88038a3 commit 38f0f08
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Expand Up @@ -2,6 +2,10 @@

---

## 1.12.22

* `CHANGED` rowData will be passed in selectCellField's `beforeFetch` & `afterFetch` method.

## 1.12.21

* `FIXED` set `this.data` in constructor
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "uxcore-table",
"version": "1.12.21",
"version": "1.12.22",
"description": "table ui component for react",
"repository": "https://github.com/uxcore/uxcore-table.git",
"author": "zhouquan.yezq",
Expand Down
8 changes: 4 additions & 4 deletions src/CellField/SelectField.jsx
Expand Up @@ -84,9 +84,9 @@ class SelectField extends CellField {
: (/\.jsonp/.test(config.fetchUrl)),
data: (config.beforeFetch || defaultBeforeFetch)({
q: value,
}),
}, me.props.rowData),
fit: (response) => {
const content = response.content || response;
const content = response.content === undefined ? response : response.content;
let success = true;
if (response.success !== undefined) {
success = response.success;
Expand All @@ -101,7 +101,7 @@ class SelectField extends CellField {
Promise,
});
me.fetch().then((content) => {
const fetchData = (config.afterFetch || defaultAfterFetch)(content);
const fetchData = (config.afterFetch || defaultAfterFetch)(content, me.props.rowData);
me.setState({
data: fetchData,
});
Expand Down Expand Up @@ -140,7 +140,7 @@ class SelectField extends CellField {
} else {
const onSearch = me.getConfig().onSearch;
if (typeof onSearch === 'function') {
onSearch(key);
onSearch(key, me.props.rowData);
}
}
}, me.getConfig().searchDelay || 100);
Expand Down

0 comments on commit 38f0f08

Please sign in to comment.