This commit is contained in:
2024-04-02 15:33:00 +02:00
parent f13ab7f9e0
commit a7dc4c0d2f
8 changed files with 132 additions and 13 deletions

View File

@@ -24,7 +24,7 @@ export default function Dialog(props) {
if (props.inputs) {
let initialData = {};
for (const input of props.inputs) {
if (input.type !== "label") {
if (input.type !== "label" && input.hasOwnProperty("name")) {
initialData[input.name] = input.value || "";
}
}
@@ -76,6 +76,14 @@ export default function Dialog(props) {
{listItems}
</List>
</Box>);
break;
case 'custom':
let element = inputProps.element;
delete inputProps.element;
inputElements.push(React.createElement(element, inputProps));
break;
default:
break;
}
}