T
TanStack3y ago
mute-gold

fetch qurey onOPen in select Box

I have one doubt. I am fetching a post API request using React Query. In the API, I have to send IDs of data as body params. I am showing the API data in a dropdown menu. I want to handle that if the dropdown is open, then only data will fetch. <Select onOpen={() => { fetchList(); }} but the problem here happening is in. network tab request is happening correctly but data in not updating in query i cannot send id's in to query like this [ 'employee-list-data', selectedIdsForDeleteSubordinates, ], otherwise it will fetch the data every time the id's changes i want only when i open select box than it fetch the data
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?