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

Fix: Quicklaunch duplicating services in the list #2135

Closed

Conversation

denispapec
Copy link
Contributor

Proposed change

When using quicklaunch, and deleting some letters and writing again; it starts to duplicate the same services in the list (as the UL object reuses the same key).

Type of change

  • New service widget
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation only
  • Other (please explain)

Checklist:

  • If adding a service widget or a change that requires it, I have added corresponding documentation changes.
  • If adding a new widget I have reviewed the guidelines.
  • If applicable, I have checked that all tests pass with e.g. pnpm lint.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.

Signed-off-by: Denis Papec <denis.papec@gmail.com>
@shamoon
Copy link
Collaborator

shamoon commented Oct 5, 2023

2135.mov

Again, I cant reproduce this. Also doesnt make sense to me the key should be on the ul but rather the li's, which already have keys

@denispapec
Copy link
Contributor Author

denispapec commented Oct 5, 2023

Again, I cant reproduce this.

Ah, another clue is that service needs to be added multiple times on homepage, for example: multiple PiHole widgets, multiple Portainer widgets, multiple Watchtower widgets....

Also doesnt make sense to me the key should be on the ul but rather the li's, which already have keys

Yeah, that's what I went to fix at first, but adding key to UL seems to resolve this issue.

@shamoon
Copy link
Collaborator

shamoon commented Oct 5, 2023

I think that only happens if they have the same name, which is explicitly something we discourage.

2135_2.mov

Btw, using random numbers for react keys is definitely not best practice

Let me know if Im missing anything here. Thanks anyway.

@shamoon shamoon closed this Oct 5, 2023
Copy link
Contributor

github-actions bot commented Feb 5, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants