Skip to content

Commit

Permalink
Update VueResultTopic to use vue3 h()
Browse files Browse the repository at this point in the history
  • Loading branch information
danon committed Dec 9, 2024
1 parent 20a9b02 commit e2534cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions resources/js/pages/search.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios';
import {VNode} from "vue";
import {h, VNode} from "vue";

import VueDropdownMenu from '../components/dropdown-menu.vue';
import VueAutocomplete from '../components/forms/autocomplete.vue';
Expand Down Expand Up @@ -91,7 +91,8 @@ const VueResultTopic = {
hits: {type: Array},
},
components: {'vue-topic': VueTopic},
render(createElement) {
render() {
const createElement = h;
let items: VNode[] = [];
this.hits.forEach(hit => items.push(createElement('vue-topic', {props: {topic: hit, postsPerPage: window.postsPerPage, showCategoryName: true}})));
return createElement('div', {class: 'card card-default card-topics'}, items);
Expand Down Expand Up @@ -212,7 +213,7 @@ createVueApp('Search', '#js-search', {
},

pushState() {
history.pushState({params: this.requestParams, hits: this.hits}, '', this.getUrl(this.requestParams));
// history.pushState({params: this.requestParams, hits: this.hits}, '', this.getUrl(this.requestParams));
},

popState(event) {
Expand Down

0 comments on commit e2534cf

Please sign in to comment.