Can configure network NAT settings from UI
This commit is contained in:
@ -9,7 +9,7 @@ import { TextInput } from "./TextInput";
|
||||
|
||||
export interface SelectOption {
|
||||
value?: string;
|
||||
label: string;
|
||||
label?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
@ -23,9 +23,10 @@ export function SelectInput(p: {
|
||||
if (!p.editable && !p.value) return <></>;
|
||||
|
||||
if (!p.editable) {
|
||||
const value = p.options.find((o) => o.value === p.value)?.label;
|
||||
const value = p.options.find((o) => o.value === p.value)?.label ?? p.value;
|
||||
return <TextInput label={p.label} editable={p.editable} value={value} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<FormControl fullWidth variant="standard" style={{ marginBottom: "15px" }}>
|
||||
<InputLabel>{p.label}</InputLabel>
|
||||
@ -41,7 +42,7 @@ export function SelectInput(p: {
|
||||
style={{ fontStyle: e.value === undefined ? "italic" : undefined }}
|
||||
>
|
||||
<div>
|
||||
{e.label}
|
||||
{e.label ?? e.value}
|
||||
{e.description && (
|
||||
<Typography
|
||||
component={"div"}
|
||||
|
Reference in New Issue
Block a user