mirror of
https://github.com/tiqi-group/pydase.git
synced 2026-06-06 09:28:39 +02:00
Merge pull request #105 from tiqi-group/fix/enum_rendering
Fix/enum rendering
This commit is contained in:
@@ -53,6 +53,9 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => {
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
setEnumValue(() => {
|
||||
return props.value;
|
||||
});
|
||||
addNotification(`${fullAccessPath} changed to ${value}.`);
|
||||
}, [props.value]);
|
||||
|
||||
@@ -70,7 +73,7 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => {
|
||||
|
||||
{readOnly ? (
|
||||
// Display the Form.Control when readOnly is true
|
||||
<Form.Control value={enumValue} name={name} disabled={true} />
|
||||
<Form.Control value={enumDict[enumValue]} name={name} disabled={true} />
|
||||
) : (
|
||||
// Display the Form.Select when readOnly is false
|
||||
<Form.Select
|
||||
@@ -80,7 +83,7 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => {
|
||||
onChange={(event) => changeCallback(event.target.value)}>
|
||||
{Object.entries(enumDict).map(([key, val]) => (
|
||||
<option key={key} value={key}>
|
||||
{key} - {val}
|
||||
{val}
|
||||
</option>
|
||||
))}
|
||||
</Form.Select>
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site displaying a pydase UI."/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>pydase App</title><script defer="defer" src="/static/js/main.ce19efa0.js"></script><link href="/static/css/main.7ef670d5.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site displaying a pydase UI."/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>pydase App</title><script defer="defer" src="/static/js/main.6d1d080e.js"></script><link href="/static/css/main.7ef670d5.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
+3
-3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user