MCPcopy Index your code
hub / github.com/Lobos/react-ui / removeFile

Method removeFile

src/Upload.js:101–114  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

99 }
100
101 removeFile (id) {
102 if (this.props.disabled || this.props.readOnly) {
103 return;
104 }
105
106 let files = this.state.files;
107 let file = files[id];
108 if (file.xhr) {
109 file.xhr.abort();
110 }
111 delete files[id];
112 this.setState({ files });
113 this.handleChange();
114 }
115
116 uploadFile (file, id) {
117 let { onUpload } = this.props;

Callers

nothing calls this directly

Calls 1

handleChangeMethod · 0.95

Tested by

no test coverage detected