0

I want to open a file on a new tab but my inertia props are lost,

my approach on opening new tab is this

window.location.href = "/view/"+props.document.type+"/"+props.document.id, "_blank"

but the my inertia props are lost. It only returns a blank html page

kissu
  • 40,416
  • 14
  • 65
  • 133
LVC
  • 51
  • 2
  • 7

1 Answers1

0

Update: there was a missing return in OP's code.


If you open a new tab, you will have your SPA nuked. The idea is to persist it with something like cookies or alike. Give a try to that answer for a possible solution: https://stackoverflow.com/a/66872372/8816585

VueJS by default has no way to persist any state out of the box (it's client side code).

kissu
  • 40,416
  • 14
  • 65
  • 133