thegrumpys / odop

Open Design Optimization Platform (ODOP) - Coil spring design app; mechanical springs; compression spring, extension spring, torsion spring
https://www.springdesignsoftware.org
MIT License
4 stars 5 forks source link

Uncaught TypeError: onHide is not a function at handleClick (Modal.js:181:1) #740

Closed grumpyinca closed 2 years ago

grumpyinca commented 2 years ago

Red traceback message in Developer tools console appears after making a change in tutor7 script. Previous run in tutor7 has AutoSave data available. Message appears with Recover AutoSave prompt (ODOP Design Recovery modal) on-screen.

Modal.js:181

   Uncaught TypeError: onHide is not a function
at handleClick (Modal.js:181:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:189:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:238:1)
at invokeGuardedCallback (react-dom.development.js:291:1)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:306:1)
at executeDispatch (react-dom.development.js:391:1)
at executeDispatchesInOrder (react-dom.development.js:416:1)
at executeDispatchesAndRelease (react-dom.development.js:3301:1)
at executeDispatchesAndReleaseTopLevel (react-dom.development.js:3310:1)

etc.

The message does not recur on browser reload. It happens only after an Eclipse Save.

1fifoto commented 2 years ago

When you click outside the "AutoSave design available. Recover the design?" Modal pop-up we treat it like you pressed the "No" button. That is, we do not load the autosave design. This is similar to other pop-up where we treat it as a "Cancel". That is, do not do the requested function.

Changed Routes.js from

<Modal show={this.state.modal}>

to

<Modal show={this.state.modal} onHide={this.loadDefaultDesign}>

Merged into master, closing.