uptick / react-keyed-file-browser

Folder based file browser given a flat keyed list of objects, powered by React.
MIT License
295 stars 143 forks source link

1.8.0 to 1.9.0 "this._fileBrowser.child" is undefined #249

Open Deep-Patidar opened 7 months ago

Deep-Patidar commented 7 months ago

Hi, I am sort of new in react and trying to update a project, the current version my project has is 1.8.0 and when i tried to update it to 1.9.0 , it started giving my error of undefined value like i tried to console.log (this._fileBrowser.child) it gives value in 1.8.0 but in 1.9.0 it says undefined I searched everywhere but was not able to find anything to resolve this issue , here is some part of my code. getting error in this line this.setState({ files: files, hasNext: response.data.has_next, lastPage: page, pageCount: response.data.count }, () => { window.removeEventListener('click', this._fileBrowser.child.handleGlobalClick); window.addEventListener('click', this.handleGlobalClick); });

this is the part where its getting its value <FileBrowser files={this.state.files} canFilter={false} ref={el => { this._fileBrowser = el }}