Skip to content

Commit 9162363

Browse files
committed
fix route when the select is not serverside
1 parent b11eb53 commit 9162363

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/resources/assets/js/components/enso/select/VueSelect.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,21 @@ export default {
250250
},
251251
252252
created() {
253-
this.route = typeof route === 'function'
254-
? route(this.source)
255-
: this.source;
253+
this.setRoute();
256254
this.getData = debounce(this.getData, this.debounce);
257255
this.getData();
258256
},
259257
260258
methods: {
259+
setRoute() {
260+
if (!this.isServerSide) {
261+
return;
262+
}
263+
264+
this.route = typeof route === 'function'
265+
? route(this.source)
266+
: this.source;
267+
},
261268
getData() {
262269
if (!this.isServerSide) {
263270
return;

0 commit comments

Comments
 (0)