Skip to content

Failed to execute 'querySelector' on 'Element': 'input[name=company.country],textarea[name=company.country],select[name=company.country]' is not a valid selector. #7

Closed
@intergalacticspacehighway

Description

Are you submitting a bug report or a feature request?

  • Feature Request

What is the current behavior?

  • The current version is not supporting Field with Object.Key pattern name which is supported by react-final-form's Field component.
  • When such a name pattern is used it creates an incorrect node selector i.e 'input[name=company.country]'.

What is the expected behavior?

  • Field Component should support object.key naming pattern.

Sandbox Link

What's your environment?

  • final-form v4.8.3
  • react-final-form v3.6.5
  • react-final-form-html5-validation v1.0.1
  • Node v8.9
  • npm v6.3

Other information

Solution which i have found.

  • This issue can be fixed by surrounding the name with quotes.
    input = root.querySelector(input[name="${name}"],textarea[name="${name}"],select[name="${name}"]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions