question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Props names collision with fields names

See original GitHub issue

Here’s a sample of how I got this error, modifying code from the test and running it to reproduce this error:

const fields = [
  'hobbies[]',
  'member.hobbies[]',
  'member.info[]',
  'member.info[].name',
  'member.info[].type',
];

form.$('member.info').add({
  name: 'AAA',
  type: 'BBB',
});

Running the test would fail when trying to select .name and .type respectively. Error: The selected field is not defined (member.info[1].name) Error: The selected field is not defined (member.info[1].type)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
foxhound87commented, Apr 2, 2017

@elazer now is returning only the index if is an array element, otherwise you have to provide the key.

0reactions
elazercommented, Mar 31, 2017

I used the return from .add() as the index. So it does not return the index of the newly added field? I remember doing it this way in previous versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React prop name collision between 3rd-party libraries
How can I can prevent errors between 3rd-party libraries when they use the same prop name but expect different data types for that...
Read more >
Prop collision with Field and Reactstrap Input components
Given that prop collisions like this are bound to happen, I'm wondering if it makes sense to create an 'extra-component-props' prop in the...
Read more >
US Baby Name Collisions 1880-2014 - staff.math.su.se
We use US Social Security Administration data to compute the probability of a name clash in a class of year-YYYY born kids during...
Read more >
React prop name collision between 3rd-party libraries-Reactjs
Coding example for the question React prop name collision between 3rd-party libraries-Reactjs.
Read more >
Introduction to collision - Unity - Manual
Collision callbacks for scripts. When collisions occur, the physics engine calls functions with specific names on any scripts attached to the objects involved....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found