Share feedback, ideas and get community help

Updated 3 months ago

Fetcher not running on changing option in a custom component

Current action code:

Plain Text
export const invoke = createAction({
  name: 'Invoke',
  baseOptions,
  options: option.object({
    chain: option.string.layout({
      placeholder: 'Select a chain',
      label: 'Chain',
      isRequired: true,
      fetcher: 'fetchChains',
    }),
  })
  ,
  fetchers: [
    {
      "id": "fetchChains",
      dependencies: ["baseUrl"],
      fetch: async ({ credentials, options }) => {
        return ["1", "2", "3", "4"]
      }
    }
  ],
})


the return of the fetcher is static for now only for me to test, I change the baseURL and see the chain component blinking but no data is added to the dropdown, am I missing something?
B
M
6 comments
Can you provide a git branch that I can pull to try it out?
Sure! created a branch here:
Ok I managed to reproduce
I will push a fix now onto main
Add a reply
Sign up and join the conversation on Discord