iossifovlab / gpfjs

MIT License
0 stars 0 forks source link

fix datasets component dataset loading race condition #1089

Closed IvoStefanov closed 1 month ago

IvoStefanov commented 1 month ago

Background

When a dataset id is saved in the state, navigating to datasets page triggered both logics for selecting current dataset: selecting first dataset because url is empty and selecting dataset id from the state.

Aim

Fix datasets page using two methods to load a dataset when state is used.

Implementation

When navigating through the main navbar the datasets page url includes the current dataset id that is saved in the state. This way the dataset page reads the id through the url and the "load first dataset" logic is skipped.