Fix max length eslint rule
This commit is contained in:
@@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
|
|
||||||
"no-restricted-globals": 0, // todo
|
"no-restricted-globals": 0, // todo
|
||||||
"max-len": 0, // todo
|
|
||||||
"prefer-destructuring": 0, // todo
|
"prefer-destructuring": 0, // todo
|
||||||
"react/default-props-match-prop-types": 0, // todo
|
"react/default-props-match-prop-types": 0, // todo
|
||||||
"react/no-access-state-in-setstate": 0, // todo
|
"react/no-access-state-in-setstate": 0, // todo
|
||||||
|
@@ -141,11 +141,17 @@ class Selection extends React.Component {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
processResults: function processResults(response) {
|
processResults: function processResults(response) {
|
||||||
return {
|
let results;
|
||||||
results: (!_.has(response, 'data'))
|
if (!_.has(response, 'data')) {
|
||||||
? []
|
results = [];
|
||||||
: response.data.map(item => ({ id: item.id || item.value, text: item.name || item.text })),
|
} else {
|
||||||
};
|
results = response.data.map((item) => {
|
||||||
|
const id = item.id || item.value;
|
||||||
|
const text = item.name || item.text;
|
||||||
|
return { id, text };
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return { results };
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
minimumInputLength: remoteQuery.minimumInputLength || 2,
|
minimumInputLength: remoteQuery.minimumInputLength || 2,
|
||||||
|
Reference in New Issue
Block a user