Search panes - server gets 2 requests when an item is selected.

Search panes - server gets 2 requests when an item is selected.

tegra_andrewtegra_andrew Posts: 7Questions: 2Answers: 0

Hello,

I'm having an issue where I have 3 cascading search panes. When I initially click an option in one of them, the other panes update accurately. However, when I click another option in the same search pane, it sends two requests to the server, one without any of the search pane query parameters, and this sometimes causes the linked search panes to update with incorrect data.

I'm not sure if I'm explaining the situation well, but please let me know if elaboration is needed.

Thanks,

Andrew

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    I'm not seeing that in this example - if you look at the Network tab for the browser, you'll see that selecting multiple entries in a single pane only sends a single request for each selection. Could there be something else making those requests in your code?

    Could you look at that, please, and see if it helps. If it's still not working for you, please can you link to your page so that we can see the problem.

    Cheers,

    Colin

  • tegra_andrewtegra_andrew Posts: 7Questions: 2Answers: 0

    Hey Colin, thanks for your response.

    I managed to get the same behavior with that example you linked, screen recording is here: https://i.imgur.com/eKK6wNC.mp4

    The double call only happens when you have an option selected, and then you select another option in the same pane. Let me know if you need a higher resolution video.

    Thanks,

    Andrew

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Thanks for that video - it is odd, I did exactly the same earlier and I'm not seeing the issue - see my video here: https://www.loom.com/share/c19364a9c7df48f2b4c7712a318adbf7

    Could you give more detail on the environment, please, such as OS version, browser version, etc. Please could you also try in private browser mode, where extensions are disabled, in case one of those is interfering,

    Colin

  • tegra_andrewtegra_andrew Posts: 7Questions: 2Answers: 0

    Sorry for the confusion, but the double request isn't on multi-select, it's on choosing a new selection in the same pane. In other words, clicking an option in the pane works fine, but then clicking another option (without holding ctrl) in the same pane causes a double request.

    I've also found that if I select an option, then deselect that option, then select a new option, the double request doesn't happen.

    If you're still unable to reproduce the issue after that, it must be something on my end. I did try incognito mode but that didn't change anything.

    Thanks for your help,

    Andrew

  • willvacseywillvacsey Posts: 1Questions: 0Answers: 0

    Hi Colin,

    I am experiencing a similar issue as Andrew. Like Andrew, the double request doesn't seem to occur on multi-select. It's shows up on selecting an alternate option in the same pane.

    The two request seems to mimic the step of (1) deselecting the unwanted filter and (2) selecting a new filter.

    Here's a video in Chrome incognito with the example link you shared.
    https://www.loom.com/share/9de6eab372e944e69204d97aa9c4c512?t=5

    Is this expected/by design?

    The video does not demo any issues. But in an internal site, sometimes the two Ajax requests are received and processed out of order when the panes are built, which can result in inaccurate counts being displayed in the Searchpanes.

    Sincerely,
    Wilson

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Ah, I see, that's right, the deselect will cause a call, and so will the following select. I'll see if this can be detected and wrapped into a single call. We'll take a look and report back later,

    Colin

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @willvacsey @tegra_andrew ,

    That should be the issue fixed. This will be available in the next SearchPanes release which we hope will be in the next few weeks. Until then you can access the fix from the nightly builds.

    Thanks,
    Sandy

  • tegra_andrewtegra_andrew Posts: 7Questions: 2Answers: 0

    Thank you so much for the prompt responses and resolution! I really appreciate it.

Sign In or Register to comment.