(dataSource)
| 51751 | }; |
| 51752 | } |
| 51753 | changeDataSource(dataSource) { |
| 51754 | this.setState({ |
| 51755 | working: true |
| 51756 | }); |
| 51757 | return new Promise((resolve, reject)=>{ |
| 51758 | const uploadFormatError = ""; |
| 51759 | const urlError = ""; |
| 51760 | this.setState({ |
| 51761 | uploadFormatError, |
| 51762 | urlError |
| 51763 | }); |
| 51764 | this.props.changeDataSource(dataSource).then(()=>{ |
| 51765 | this.setState({ |
| 51766 | working: false, |
| 51767 | uploadFormatError: "", |
| 51768 | urlError: "", |
| 51769 | dialogMode: null |
| 51770 | }); |
| 51771 | resolve(); |
| 51772 | }).catch((reason)=>{ |
| 51773 | this.setState({ |
| 51774 | working: false |
| 51775 | }); |
| 51776 | reject(reason); |
| 51777 | }); |
| 51778 | }); |
| 51779 | } |
| 51780 | upload(e) { |
| 51781 | if (e.target.files) { |
| 51782 | const file = e.target.files[0]; |
no test coverage detected