feat: Prefix instance id when custom node id is passed #325
feat: Prefix instance id when custom node id is passed #325
Conversation
| * | ||
| */ | ||
| export default class Node { | ||
| constructor({ depth, rootPrefixId, parent, index, ...dataProps }) { |
There was a problem hiding this comment.
Function constructor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
@ellinge @Nogias9x Is this good to go? |
|
@mrchief the change on the resolved conversation should be reverted? Or was that another change that was needed? |
Yeah it should be. It's been a while so let me take a deep dive. |
|
Code Climate has analyzed commit 588d40c and detected 2 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
What does it do?
When a user defined node id is specified, it is used instead of an autogenerated on. When the same data is used across multiple components on the same page, this results in duplicate HTML Ids for tags, tag remove buttons.
Fixes # (issue)
Fixes #315
Also fixes an unreported bug where removing tags by backspace doesn't correctly fire
onTagRemoveevent.Type of change
Please delete options that are not relevant.
Checklist: