Skip to content

Commit

Permalink
feat: multiple clickable pills (#5327)
Browse files Browse the repository at this point in the history
  • Loading branch information
roger-in-kiva committed May 22, 2024
1 parent c5bd105 commit 4085cf1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/components/LoanCards/KvClassicLoanCardContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,16 @@ export default {
},
jumpFilterPage(filter) {
this.$kvTrackEvent('Lending', 'loan-card', 'clicked-tag', filter.type, filter.id.toString());
const query = {};
query[filter.type] = filter.id.toString();
if (!_isEqual(this.$route.query, query)) {
const { query: currentQuery } = this.$route;
const query = { ...currentQuery };
if (filter.type in query && query[filter.type] !== filter.id.toString()) {
query[filter.type] += `,${filter.id.toString()}`;
} else {
query[filter.type] = filter.id.toString();
}
if (!_isEqual(currentQuery, query)) {
this.$router.push({
path: '/lend/filter',
query,
Expand Down

0 comments on commit 4085cf1

Please sign in to comment.