You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The loading process is exactly same as in the previous example. The key point here is how to reset the component when we change the filter or tabs. The infinite component will reset itself whenever the `identifier` property has changed. It sounds easy, so let's do it!
7
+
The loading process is exactly the same as in the previous example. The key point here is how to reset the component when we change the filter or tabs. The infinite loading component will reset itself whenever the `identifier` property has changed. It sounds easy, so let's do it!
8
8
9
9
```html {12}
10
10
<header>
@@ -21,7 +21,7 @@ The loading process is exactly same as in the previous example. The key point he
In the template, we add a `select` element and listen its `change` event. For the `InfiniteLoading` component, we add an `identifier` property.
24
+
In the template, we add a `select` element and listen for its `change` event. For the `InfiniteLoading` component, we add an `identifier` property.
25
25
26
26
```js {10,11,19,31,32,33,34,35}
27
27
importaxiosfrom'axios';
@@ -63,6 +63,6 @@ export default {
63
63
};
64
64
```
65
65
66
-
In the script, we set default values for `select` and `identifier` properties, then add the type parameter in API request logic. And we create the `changeType` method to reset the list data and infinite component. Please note, we must change the `identifier` property *after* we empty the `list`. Otherwise, the component may not trigger the `infinite` event immediately after reset.
66
+
In the script, we set default values for the `select` and `identifier` properties, then add the type parameter in the API request logic, and we create the `changeType` method to reset the list data and infinite loading component. Please note, we must change the `identifier` property *after* we empty the `list`. Otherwise, the component may not trigger the `infinite` event immediately after reset.
0 commit comments