use ref instead of state variable in flow-control functions
use ref instead of state variable in flow-control functions

this was causing issues when the main and facet requests were fast
as the isLoading state variable would be behind the actual ref value.

informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise