Added value keys to the ConfigurationRow.jsx

This commit is contained in:
Mathias Wagner 2023-06-03 01:35:00 +02:00
parent 43938526a5
commit d734b07109
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -11,7 +11,10 @@ export const ConfigurationRow = ({text, icon = faSquareRootVariable, type = "inp
</div> </div>
{type === "select" && <select className="input-field" value={value} onChange={(e) => setValue(e.target.value)}> {type === "select" && <select className="input-field" value={value} onChange={(e) => setValue(e.target.value)}>
{options.map((option) => <option key={option}>{option}</option>)} {options.map((option) =>
option.value ? <option value={option.value} key={option.value}>{option.text}</option>
: <option key={option}>{option}</option>
)}
</select>} </select>}
{type === "input" && <input className="input-field" type="text" placeholder={text} value={value} {type === "input" && <input className="input-field" type="text" placeholder={text} value={value}