Skip to content
This repository was archived by the owner on Jun 10, 2021. It is now read-only.

Commit f407389

Browse files
committed
Removed loader from vue datasource
1 parent bc5470a commit f407389

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/components/ServerDatasource.vue

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ import axios from 'axios'
33
import _ from 'lodash'
44
import DatasourceUtils from '../utils/DatasourceUtils'
55
import Pagination from './Pagination.vue'
6-
import MoonLoader from 'vue-spinner/src/MoonLoader.vue'
76
import { EventBus } from '../utils/EventBus'
87
export default {
98
name: 'ServerDatasource',
10-
components: {
11-
Pagination, MoonLoader
12-
},
9+
components: {Pagination},
1310
render (h) {
1411
return (
1512
<div class="vue-server-datasource">
@@ -42,7 +39,6 @@ export default {
4239
</tr>
4340
</tbody>
4441
</table>
45-
{ this.spinnerItem }
4642
</div>
4743
<div class="panel-footer">
4844
<div class="pull-left btn-group btn-group-actions">
@@ -124,7 +120,6 @@ export default {
124120
return {
125121
perpage: 10,
126122
tableData: [],
127-
loading: false,
128123
selected: null, // row and Object selected on click event
129124
indexSelected: -1, // index row selected on click event
130125
search: '', // word to search in the table,
@@ -138,13 +133,6 @@ export default {
138133
}
139134
},
140135
computed: {
141-
spinnerItem () {
142-
if (this.loading) {
143-
return <div class="vue-spinner-wrapper">
144-
<moon-loader></moon-loader>
145-
</div>
146-
}
147-
},
148136
limitOptions () {
149137
return this.limits.map((limit, index) => {
150138
return <option value={ limit } selected={ parseInt(this.perpage) === parseInt(limit) }>{ limit }</option>
@@ -203,16 +191,13 @@ export default {
203191
this.$emit('searching', this.search)
204192
},
205193
setData () {
206-
this.loading = true
207194
axios.get(`${this.source}?per_page=${this.perpage}&page=${this.pagination.current_page}&search=${this.search}`)
208195
.then((response) => {
209-
this.loading = false
210196
this.tableData = response.data.data
211197
this.pagination = response.data.pagination
212198
this.perpage = this.pagination.per_page
213199
})
214200
.catch((error) => {
215-
this.loading = false
216201
console.warn(`[VueDatasource] ${error}`)
217202
})
218203
}

0 commit comments

Comments
 (0)