Sfoglia il codice sorgente

fix NME preview mesh reloading bug

Kyle Belfort 5 anni fa
parent
commit
6264f11975

+ 1 - 0
dist/preview release/what's new.md

@@ -108,6 +108,7 @@
 - Fixed error when downloading async createScene function in playground ([#7926](https://github.com/BabylonJS/Babylon.js/issues/7926)) ([RaananW](https://github.com/RaananW))
 - Fix issue where ThinEngine.prototype.createDynamicEngine is undefined when using VideoTexture with es6 packages ([rvadhavk](https://github.com/rvadhavk))
 - Fix [issue](https://forum.babylonjs.com/t/virtualjoystick-needs-to-set-style-touch-action-none-explicitly/9562) that canvas for `VirtualJoystick` does not have `touch-action: "none"` set by default ([joergplewe](https://github.com/joergplewe))
+- Fix [issue](https://github.com/BabylonJS/Babylon.js/issues/7943) that prevented user from re-loading custom meshes
 
 ## Breaking changes
 

+ 3 - 1
nodeEditor/src/components/preview/previewMeshControlComponent.tsx

@@ -50,7 +50,9 @@ export class PreviewMeshControlComponent extends React.Component<IPreviewMeshCon
             this.props.globalState.onPreviewCommandActivated.notifyObservers();        
             this.forceUpdate();
         }
-        (ReactDOM.findDOMNode(this.refs["file-picker"]) as HTMLInputElement).value = "";
+        if(this.filePickerRef.current){
+            this.filePickerRef.current.value = ""
+        }
     }
 
     onPopUp() {