When loading the search value from state, the default table shows quickly before the filtered by the search result loads. Sometimes search triggers before the rows are loaded which results in showing the default table data despite having search value in the input (to reproduce that type in the search and reload multiple times)
Aim
To remove the flicker (show directly the filtered result) and to fix the bug.
Implementation
there are too much variables saving the search input (searchKeystrokes$, geneInput, loadedSearchValue) and not all are updated at the same time which causes loading wrong table data - make to use searchKeystrokes$ only
rename searchKeystrokes$ to searchValue$ and make it BehaviourSubject to access the stored value easily
call loadState method from the subscription of the getUserGeneProfilesState to prevent loading the default table
…m state
Background
When loading the search value from state, the default table shows quickly before the filtered by the search result loads. Sometimes search triggers before the rows are loaded which results in showing the default table data despite having search value in the input (to reproduce that type in the search and reload multiple times)
Aim
To remove the flicker (show directly the filtered result) and to fix the bug.
Implementation
searchKeystrokes$
,geneInput
,loadedSearchValue
) and not all are updated at the same time which causes loading wrong table data - make to usesearchKeystrokes$
onlysearchKeystrokes$
tosearchValue$
and make itBehaviourSubject
to access the stored value easilyloadState
method from the subscription of thegetUserGeneProfilesState
to prevent loading the default table