Skip to content

Commit

Permalink
fix: ActionButton with query params
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to committed Dec 18, 2024
1 parent 8f25086 commit 199d3bc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/UI/resources/js/Components/ActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ export default () => ({
},

dispatchEvents(componentEvent, exclude = null, extra = {}) {
const url = new URL(this.$el.href)
let url = new URL(this.$el.href)

if(this.withQueryParams) {
const queryParams = new URLSearchParams(window.location.search)

url = new URL(mergeURLString(url.toString(), queryParams))
}

const preparedURLParams =
exclude === '*'
Expand Down

0 comments on commit 199d3bc

Please sign in to comment.