feat: Prefix instance id when custom node id is passed
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 onTagRemove event.
Type of change
Please delete options that are not relevant.
- [X] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [n/a] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [n/a] This change requires a documentation update
Checklist:
- [X] I have performed a self-review of my own code
- [X] I have commented my code, particularly in hard-to-understand areas
- [n/a] Updated documentation (if applicable)
- [ ] Added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [X] My changes generate no new warnings
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?
@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 588d40c7 and detected 2 issues on this pull request.
Here's the issue category breakdown:
| Category | Count |
|---|---|
| Complexity | 1 |
| Bug Risk | 1 |
View more on Code Climate.