URL query params - infinite loop

chrome_YDaIdbAtKB

I have spent around 8 hours trying to get around issues with my URL-parameters controlled view ending up in a very reproducible endless loop. I'm pretty much at my wits end and I realize that this most likely is caused by something very specific to my setup, as I am unable to recreate this in a minimal application.

Any pointers or guesses are very welcomed...

Here are some more details:

URL Params config

image

Table data and indexing

Products table

image

image

Recipes table

image

image

The table data

    {
      "code": "100w-ipa-fat",
      "frozenAt": null,
      "marketProductsByProductCode": {
        "nodes": [
          {
            "id": 6621,
            "marketName": "SE",
            "recipes": {
              "nodes": [
                {
                  "id": 7563,
                  "marketName": "SE",
                  "status": "COMPLETE",
                  "title": {
                    "defaultText": "100W 6,8% On Tap"
                  },
                  "oldProductId": "100w-ipa-fat",
                  "defaultRecipe": true
                }
              ]
            }
          }
        ]
      },
      "title": {
        "defaultText": "100W 6,8% On Tap"
      },
      "marketProductId": 6621
    },

Hey @Herge, I've encountered a very similar looping problem when two-way syncing text input and select components with hash parameters. Contrary to the documentation, I found that leaving the default index/value blank fixed this. To me, whatever you enter in the second part of the URL parameters config (Connect properties on the page to values in the URL) is already doing the job of setting defaults, and it's the duplication in function that results in looping.

I don't know if the documentation is wrong, or if its a particular use case that doesn't require default index/value to be populated, but it might be worth trying. You should test in both directions, i.e. interact with your tables to observe the change in hash parameters, and vice versa.

Hey @ryanm and thanks for the response. Sadly this is part of what I've tried in my 4-5 different implementation of the same UI-flow... Tried again now to be sure, but the issue remains.

1 Like

Ah sorry I couldn't be of more help! I hope you can get it sorted :smiling_face:

After implementing another query parameter-based persistence on some table filtering fields I'm noting a pattern; URL params that are based on remotely fetched data seem to be removed inexplicably.

Here's a gif of it happening, looping the same way as the original issue

chrome_01d73BhMdC

chrome_hRhBwdO8Aq

Once again I cannot reproduce this in a minimal app without remotely fetched data. Tried without "Connect properties" and without "Default value", no difference.

Hi @Herge

I know that you mentioned outside of this thread that you have somewhat of a workaround implemented. I'd still love to get this in a fully functioning state! Let me know if you're free to jump on a call (or if you can join office hours) to delve into this a bit further!

Hi, I also see this issue, for me it is with tabbedContainer objects that are switching views - does anyone have an answer on this by now?

Hey @Dominik_Basner! Thanks for reaching out.

I'm guessing that you're controlling the active tab with URL params, similar to what is described above? Are you able to share a JSON export of your app with hard-coded query results?

Doing so is likely the fastest way for me to understand the complexities of your app. If not, screenshots of any relevant components will suffice. :+1:

Hi Darren, thx for answering. I am not able to reproduce the issue. If I see it again, I will try to reach out again

1 Like