jeroenpelgrims / vue-use-query-param

Use url query parameter like regular refs in Vue, in a typesafe way.
9 stars 1 forks source link

ObjectParam does a double encoding using encodeURIComponent. #1

Closed jeroenpelgrims closed 8 months ago

jeroenpelgrims commented 8 months ago

With the following code, the query parameter has a value with %2522 in it. This is a double encoding of a double quote character. Probably vue-router is already doing a url encoding internally and we don't have to do it in the ObjectParam ourselves.

type MyObject = {
  foo: string;
}

const orderBy = useQueryParam("orderBy", ObjectParam<keyof MyObject>());