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?