mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
Fix działania reaktywności linków
This commit is contained in:
@@ -134,6 +134,16 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
|
||||
// Handle route updates for route-links
|
||||
beforeRouteUpdate(to, from) {
|
||||
const timetableId = to.query['timetableId']?.toString();
|
||||
|
||||
if (!timetableId) return;
|
||||
|
||||
this.searchersValues['search-train'] = `#${timetableId}`;
|
||||
this.searchHistory();
|
||||
},
|
||||
|
||||
activated() {
|
||||
if (this.timetableId) {
|
||||
this.searchersValues['search-train'] = `#${this.timetableId}`;
|
||||
@@ -142,8 +152,6 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
mounted() {
|
||||
console.log('mounted');
|
||||
|
||||
if (!this.timetableId) this.searchHistory();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user