Pricing Blog

input field call my API

  • jehex-1367876958750511256

    Jehex

    2 months ago

    Hi there, probably an issue that some people already had but when I type on a input field ( who not supposed to trigger any api but is bind to a variable that I use as parameter for an api ) it's just trigger my api even I set a stop propagation / prevent default on it, any idea ? Thanks
  • plusmin-1367885231272493178

    Armand

    2 months ago

    If the api is set to autofetch then this will trigger the api. You could put a debounce on the api (see in advanced tab) to make sure it doesn’t fetch at every keystroke.
    Or turn off autofetch and only call the api with an event trigger.
  • jehex-1368027757929566249

    Jehex

    2 months ago

    Hi there
  • the api is not set to auto fetch unfortunetly
  • lucasg-1368057124432904272

    Lucas G

    2 months ago

    Are you able to share the project
  • Or recreate and share?
  • An API shouldn’t automatically be called unless it is part of a workflow.
  • jehex-1368059333757112401

    Jehex

    2 months ago

    Hi there thanks for your answer ! possible to share you some screenshots ?
  • lucasg-1368059452074360842

    Lucas G

    2 months ago

    Sure
  • jehex-1368061596383055932

    Jehex

    2 months ago

    I fixed the issue by set a temp variable into the search bar, "searchTemp" then when I call the api, just before I set search ( variable use for my api ) = searchTemp
    1368061595787329606-Untitlecd.png
    1368061596135325797-Untitled.png
  • 128651941143117824-@Lucas G
    Sure
    jehex-1368064565467811942

    Jehex

    2 months ago

    if you need more infos let me know, Im sorry I cannot share the projet for now, its a private one
  • lucasg-1368064683965288508

    Lucas G

    2 months ago

    It's fine. This might be a bug though
  • jehex-1368065915446497330

    Jehex

    2 months ago

    I think so, do you want I post in the bugs channel
  • lucasg-1368066950911229972

    Lucas G

    2 months ago

    Yeah it would be good to get confirmation from the NC team
  • jehex-1368076476385329192

    Jehex

    2 months ago

    Ok thanks