vue-query-synchronizer icon indicating copy to clipboard operation
vue-query-synchronizer copied to clipboard

Integer query props should be unsettable

Open mirekys opened this issue 5 years ago • 1 comments

Currently there is no way of programatically unsetting an integer type prop from query once it is set in URL.

  • setting it to null sets the property to default value (0), which is not always desirable
  • removing it through query._remove() results in:
TypeError: this[prop].includes is not a function"
at Object.queryObject._remove (vue-query-synchronizer.esm.js?a9ce:257)

mirekys avatar May 15 '20 11:05 mirekys

I just stumbled with this one too while trying to pass IDs on query strings. My current solution is to declare everything as string on the router, but also when using creating links I need to cast the query parameters as a string (ie <router-link :to="{name: 'foo.edit', params: {id: object.id.toString()}}">...

fedeisas avatar May 21 '20 04:05 fedeisas