You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello all. I started learning about Intercooler last week. I have a few doubts that I didn't find an answer to elsewhere. I'm trying to convert a pure HTML datatable to use Intercooler and even though it appears to be working, I'm experiencing an odd behavior. Every time a click on the table header, which contains link to order the data by the column names, the URL of the page gets bigger.
The view code is big, so I'll try to show only the relevant parts. This is my header code:
This is a Laravel blade component. What I'm doing here is making each header a link that contains query parameters that refer to all parameters necessary to query the database for the results to be shown in the current page. So, the links all contain the following parameters: offset, limit, orderBy and orderAsc. By using the method fullUrlWithQuery in Laravel, I'm able to create a URL with all current query parameters changing only those provided in the array. In case the parameters provided were not present, they are added.
At first, everything works. But after a few clicks on the links from my table header this is my request URL. The URL keeps growing after each click, to the point that it corrupts and after that I only receive 404 errors.
I think it has something to do with the ic-current-url parameter, that is being added automatically to my URL, and it includes itself. So after each click the URL gets bigger.
The text was updated successfully, but these errors were encountered:
etrokal
changed the title
Query string keeps getting bigger ic-get-from / ic-curreent-url
Query string keeps getting bigger ic-get-from / ic-current-url
Mar 31, 2020
Hello all. I started learning about Intercooler last week. I have a few doubts that I didn't find an answer to elsewhere. I'm trying to convert a pure HTML datatable to use Intercooler and even though it appears to be working, I'm experiencing an odd behavior. Every time a click on the table header, which contains link to order the data by the column names, the URL of the page gets bigger.
The view code is big, so I'll try to show only the relevant parts. This is my header code:
This is a Laravel blade component. What I'm doing here is making each header a link that contains query parameters that refer to all parameters necessary to query the database for the results to be shown in the current page. So, the links all contain the following parameters: offset, limit, orderBy and orderAsc. By using the method fullUrlWithQuery in Laravel, I'm able to create a URL with all current query parameters changing only those provided in the array. In case the parameters provided were not present, they are added.
In my main component I have this tag:
I also have a form with these fields to filter and change the number of results:
At first, everything works. But after a few clicks on the links from my table header this is my request URL. The URL keeps growing after each click, to the point that it corrupts and after that I only receive 404 errors.
I think it has something to do with the ic-current-url parameter, that is being added automatically to my URL, and it includes itself. So after each click the URL gets bigger.
The text was updated successfully, but these errors were encountered: