Skip to content

Commit

Permalink
ver. 0.4.21
Browse files Browse the repository at this point in the history
  • Loading branch information
qili.taoqili committed Jul 12, 2019
1 parent d917fed commit 3f04416
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uxcore-select-form-field",
"version": "0.4.20",
"version": "0.4.21",
"description": "uxcore-select-form-field component for uxcore.",
"repository": "https://github.com/uxcore/uxcore-select-form-field.git",
"author": "eternalsky",
Expand Down
13 changes: 8 additions & 5 deletions src/SelectFormField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class SelectFormField extends FormField {
jsxdata,
} = this.props;

this.fetch = NattyFetch.create({
const param = {
url: jsxfetchUrl,
jsonp: dataType
? dataType === 'jsonp'
Expand All @@ -156,10 +156,13 @@ class SelectFormField extends FormField {
q: value,
}),
method: fetchMethod || method,
header: fetchHeader,
fit: fitResponse,
Promise,
});
}
if (fetchHeader) {
param.header = fetchHeader
}
this.fetch = NattyFetch.create(param);

this.fetch().then((content) => {
let fetchData = processData(afterFetch(content));
Expand Down Expand Up @@ -492,8 +495,8 @@ SelectFormField.defaultProps = assign({}, FormField.defaultProps, {
fetchDataOnMount: true,
useValueText: false,
method: 'GET',
fetchMethod: '', // 替代method
fetchHeader: {},
fetchMethod: undefined,
fetchHeader: undefined,
dropdownAlign: {
points: ['tl', 'bl', 'tr', 'br'],
offset: [0, 4],
Expand Down

0 comments on commit 3f04416

Please sign in to comment.