Uniforms: The selectField inside the ListField are

Created on 24 May 2018  路  4Comments  路  Source: vazco/uniforms

When we change the combo in one row the combo in the other row are affected too.
Maybe a problem in id generation of the selectFields?

bug

All 4 comments

Hi @danilomiranda. Could you post a smallest possible reproduction? I were using SelectField in ListField multiple times and it was OK. Also, version and theme would help.

I'm using uniforms-bootstrap4

<ListField
            name="adverse_event"
            removeIcon={<Icon icon="minus" />}
            disable={false}
          >
            <ListItemField name="$" disable={false}>
              <NestField disable={false}>
                <ListAddField addIcon={<Icon icon="plus" />} />
                <Row>
                  <SelectField
                    name="type"
                    placeholder="Select"
                    checkboxes={false}
                    showInlineError
                  />

                  <SelectField
                    name="grade"
                    placeholder="Select"
                    showInlineError
                    checkboxes={false}
                  />
                  <DateCustom
                    label="Date"
                    model={props.model}
                    onChangeDate={props.changeDate}
                    field="date"
                  />
                </Row>
              </NestField>
            </ListItemField>
          </ListField>

bridge (graphQL
"adverse_event.$.type": { label: "Adverse event", options: [ { label: "Implant / Instrumentation related ", value: "Implant / Instrumentation related" }, ] }, "adverse_event.$.grade": { label: "Grade", options: [ { label: "Grade 1", value: "Grade 1" }, ] }, "adverse_event.$.date": { label: "Date of recognition" }, "adverse_event.$.other.details": { label: "Please specify" }

screencast 2018-05-29 21-41-56

As I've check it, there's a problem with the <ListAddField /> - the one above the list add a new item each time and the one inside reuses the same object, so it got modified. I'll definitely look into that.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simplecommerce picture simplecommerce  路  4Comments

thearabbit picture thearabbit  路  4Comments

serkandurusoy picture serkandurusoy  路  5Comments

vfonic picture vfonic  路  3Comments

todda00 picture todda00  路  7Comments