firebase-tools-ui
firebase-tools-ui copied to clipboard
firestore emulator ui: clicking a 2nd collection attempts to load the last visited collections's first doc by default
Environment info
firebase-tools:
11.25.3
Platform:
macOS Ventura 13.3.1 (22E261)
Test case
Create a firestore database with at least 2 collections having at least 2 docs each, and follow the steps below.
Steps to reproduce
- Fire up the firestore emulator ui.
- Click the name in the left hand side column of one of the collections, notice the first docId in the list.
- Click the name of another collection, observe it uses the id of the first doc of the previous collection as default and thus fails to load the doc details (as that doc id doesn't exist in that collection). Clicking an existing doc id of the just clicked collection loads the doc fine.
This is only an issue with the initial load of the collection that has just been clicked, any doc being visited directly or by clicking their id loads the doc details perfectly fine.
Expected behavior
Clicking a 2nd collection should load with its own first doc, and this load the doc details fine.
Actual behavior
Clicking a 2nd collection loads it with the previously clicked collection's first doc, and thus fails to load anything (as that doc id doesn't exist in that collection).