Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The selectField inside the ListField are #428

Closed
danilomiranda opened this issue May 24, 2018 · 4 comments
Closed

The selectField inside the ListField are #428

danilomiranda opened this issue May 24, 2018 · 4 comments
Assignees
Labels
Type: Bug Bug reports and their fixes

Comments

@danilomiranda
Copy link

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?

@radekmie radekmie self-assigned this May 27, 2018
@radekmie
Copy link
Contributor

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.

@danilomiranda
Copy link
Author

danilomiranda commented May 30, 2018

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

    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

@radekmie
Copy link
Contributor

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.

@radekmie radekmie added the Type: Bug Bug reports and their fixes label May 30, 2018
@danilomiranda
Copy link
Author

Thanks!

@Monteth Monteth added this to Closed in Open Source (migrated) Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug reports and their fixes
Projects
Archived in project
Development

No branches or pull requests

2 participants