laravel-splade icon indicating copy to clipboard operation
laravel-splade copied to clipboard

Defer component with infinite polling

Open lucassdoro opened this issue 7 months ago • 0 comments

  • Laravel Version: 10.28.0
  • PHP Version: 8.2.11
  • Splade JS Version (npm): 1.4.16
  • Splade PHP Version (composer): 1.4.16
  • Dev environment (OS, Sail/Valet/etc): Sonoma 14.1 / Sail

Description:

Whenever I try to use the Defer component with polling and switch pages, the polling continues to run endlessly as if the previous page still existed.

Steps To Reproduce Issue:

  1. Create 3 pages.
  2. On the first page, add a component with <x-splade-defer accept="application/json" url="url" poll="5000"></x-splade-defer>.
  3. Leave the other page blank.
  4. On the initial page, add links to the other two pages using the Link component.
  5. When switching to the blank page, you will notice that the request continues to be made.

lucassdoro avatar Nov 09 '23 03:11 lucassdoro