Skip to content

Commit 9b8ac65

Browse files
authored
feat(core): rename reload to refresh (#2645)
Reason: for consistency with vue-instantsearch .
1 parent b3185e5 commit 9b8ac65

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dev/app/builtin/stories/reload.stories.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import { storiesOf } from 'dev-novel';
44
import instantsearch from '../../../../index';
55
import { wrapWithHits } from '../../utils/wrap-with-hits.js';
66

7-
const stories = storiesOf('Reload');
7+
const stories = storiesOf('Refresh');
88

99
export default () => {
1010
stories.add(
1111
'default',
1212
wrapWithHits(container => {
1313
const button = document.createElement('button');
14-
button.addEventListener('click', () => window.search.reload());
15-
button.innerHTML = 'Reload InstantSearch';
14+
button.addEventListener('click', () => window.search.refresh());
15+
button.innerHTML = 'Refresh InstantSearch';
1616
const searchBoxContainer = document.createElement('div');
1717
window.search.addWidget(
1818
instantsearch.widgets.searchBox({ container: searchBoxContainer })

src/lib/InstantSearch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ Usage: instantsearch({
200200
}
201201

202202
/**
203-
* The reload method clears the cached answers from Algolia and triggers a new search.
203+
* The refresh method clears the cached answers from Algolia and triggers a new search.
204204
*
205205
* @return {undefined} Does not return anything
206206
*/
207-
reload() {
207+
refresh() {
208208
if (this.helper) {
209209
this.helper.clearCache().search();
210210
}

0 commit comments

Comments
 (0)