added keys in form rows and made noOfLockers integer
This commit is contained in:
parent
bb108f809f
commit
bd32eb02d6
@ -20,7 +20,7 @@ function LockersRegistration() {
|
||||
const noOfLockers = location.state?.noOfLockers;
|
||||
const cabinetId = location.state?.cabinetId;
|
||||
|
||||
const initLockers = Array(noOfLockers ? parseInt(noOfLockers) : 0)
|
||||
const initLockers = Array(noOfLockers)
|
||||
.fill()
|
||||
.map(() => ({
|
||||
id: "",
|
||||
@ -163,9 +163,9 @@ function LockersRegistration() {
|
||||
const valid = lockerValues[`${field.name}Valid`];
|
||||
|
||||
return field.type === "input" ? (
|
||||
<FormInput props={commonProps} valid={valid} />
|
||||
<FormInput key={field.name} props={commonProps} valid={valid} />
|
||||
) : (
|
||||
<FormSelect props={commonProps} valid={valid} options={field.options} />
|
||||
<FormSelect key={field.name} props={commonProps} valid={valid} options={field.options} />
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user