From 853472be9407793d1080a8ee51e2a0aafca7d603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Mon, 4 Mar 2024 11:47:51 +0100 Subject: [PATCH 1/3] updates enumValue when backend value changes --- frontend/src/components/EnumComponent.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/components/EnumComponent.tsx b/frontend/src/components/EnumComponent.tsx index d28a919..70f2f0d 100644 --- a/frontend/src/components/EnumComponent.tsx +++ b/frontend/src/components/EnumComponent.tsx @@ -53,6 +53,9 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => { }); useEffect(() => { + setEnumValue(() => { + return props.value; + }); addNotification(`${fullAccessPath} changed to ${value}.`); }, [props.value]); From af36ed6c431cf7e1abfecaf694202925a1c68051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Mon, 4 Mar 2024 11:48:01 +0100 Subject: [PATCH 2/3] changes rendering of enums --- frontend/src/components/EnumComponent.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/EnumComponent.tsx b/frontend/src/components/EnumComponent.tsx index 70f2f0d..f8ef4bd 100644 --- a/frontend/src/components/EnumComponent.tsx +++ b/frontend/src/components/EnumComponent.tsx @@ -73,7 +73,7 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => { {readOnly ? ( // Display the Form.Control when readOnly is true - + ) : ( // Display the Form.Select when readOnly is false { onChange={(event) => changeCallback(event.target.value)}> {Object.entries(enumDict).map(([key, val]) => ( ))} From cf5bc1e4e68b51b2118a6955f020ec6e29abf508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Mon, 4 Mar 2024 11:48:22 +0100 Subject: [PATCH 3/3] npm run build --- src/pydase/frontend/asset-manifest.json | 6 +++--- src/pydase/frontend/index.html | 2 +- .../static/js/{main.ce19efa0.js => main.6d1d080e.js} | 6 +++--- ...ce19efa0.js.LICENSE.txt => main.6d1d080e.js.LICENSE.txt} | 0 src/pydase/frontend/static/js/main.6d1d080e.js.map | 1 + src/pydase/frontend/static/js/main.ce19efa0.js.map | 1 - 6 files changed, 8 insertions(+), 8 deletions(-) rename src/pydase/frontend/static/js/{main.ce19efa0.js => main.6d1d080e.js} (95%) rename src/pydase/frontend/static/js/{main.ce19efa0.js.LICENSE.txt => main.6d1d080e.js.LICENSE.txt} (100%) create mode 100644 src/pydase/frontend/static/js/main.6d1d080e.js.map delete mode 100644 src/pydase/frontend/static/js/main.ce19efa0.js.map diff --git a/src/pydase/frontend/asset-manifest.json b/src/pydase/frontend/asset-manifest.json index 16baf4c..ff043bb 100644 --- a/src/pydase/frontend/asset-manifest.json +++ b/src/pydase/frontend/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "/static/css/main.7ef670d5.css", - "main.js": "/static/js/main.ce19efa0.js", + "main.js": "/static/js/main.6d1d080e.js", "index.html": "/index.html", "main.7ef670d5.css.map": "/static/css/main.7ef670d5.css.map", - "main.ce19efa0.js.map": "/static/js/main.ce19efa0.js.map" + "main.6d1d080e.js.map": "/static/js/main.6d1d080e.js.map" }, "entrypoints": [ "static/css/main.7ef670d5.css", - "static/js/main.ce19efa0.js" + "static/js/main.6d1d080e.js" ] } \ No newline at end of file diff --git a/src/pydase/frontend/index.html b/src/pydase/frontend/index.html index 53fd8b8..4cddf07 100644 --- a/src/pydase/frontend/index.html +++ b/src/pydase/frontend/index.html @@ -1 +1 @@ -pydase App
\ No newline at end of file +pydase App
\ No newline at end of file diff --git a/src/pydase/frontend/static/js/main.ce19efa0.js b/src/pydase/frontend/static/js/main.6d1d080e.js similarity index 95% rename from src/pydase/frontend/static/js/main.ce19efa0.js rename to src/pydase/frontend/static/js/main.6d1d080e.js index e78e2e6..82f0cd7 100644 --- a/src/pydase/frontend/static/js/main.ce19efa0.js +++ b/src/pydase/frontend/static/js/main.6d1d080e.js @@ -1,3 +1,3 @@ -/*! For license information please see main.ce19efa0.js.LICENSE.txt */ -(()=>{var e={694:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},888:(e,t,n)=>{"use strict";var r=n(47);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},7:(e,t,n)=>{e.exports=n(888)()},47:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},463:(e,t,n)=>{"use strict";var r=n(791),o=n(296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n