0

In adminjs, you can set the choices of a field like this:

    {
      resource: Contract,
      options: {
        navigation: {
          name: 'Crypto',
        },
        properties: {
          symbol: {
            availableValues: availableTokenSymbols.map((o) => ({
              value: o.toString(),
              label: o.toString(),
            })),
          },
        },
      },
    },

This way, someone editing a "Contract" in the admin panel can only choose from the available values.

Is there a way to load availableValues dynamically, every time the form is used?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
synic
  • 26,359
  • 20
  • 111
  • 149

0 Answers0