• Robert Knight's avatar
    Update UI state after search API request completes with no results · 6801a49a
    Robert Knight authored
    When a search API request returns results, the returned annotations are
    added to the app state and this transition triggers a digest cycle.
    
    When there are no results however, this was not happening and the value
    of the 'isLoading()' function changed but no digest cycle was triggered
    to pick this up and reflect it in the UI.
    
    Since SearchClient's 'end' event is emitted asynchronously via a Promise
    callback, $scope.$apply() or $evalAsync() must be used to ensure that
    change detection runs.
    
    The real solution will be to store all the information required to
    determine the loading/not-loading state in the Redux store, so that any
    transition automatically triggers a digest cycle. This requires some
    more extensive refactoring however.
    6801a49a
Name
Last commit
Last update
.github Loading commit data...
h Loading commit data...
images Loading commit data...
scripts Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.hound.yml Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.travis.yml Loading commit data...
CHANGELOG.md Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
gulpfile.js Loading commit data...
npm-shrinkwrap.json Loading commit data...
package.json Loading commit data...