Feature request :
Hello,This feature allow us to use a Dataset URL
instead of the default UI alter values
. The format return by API should be [{value: 'my-value, label: 'my-label'}, ....]
like your own system. So we could setup the display setting with this type of UI:
Usefull if you have a long list of altered value (in my case I use a languages and countries lists).
How to do for now :
my model (sequelize):
....
countryOfResidence: {
type: DataTypes.ENUM(Object.keys(COUNTRY_CODE)),
},
....
I use smart field with this config :
{
field: 'smartCountryOfResidence',
type: 'Enum',
enums: Object.values(COUNTRY_CODE),
get: (data) => COUNTRY_CODE[data.countryOfResidence],
set: (data, value) => {
const countryCode = lodash.findKey(COUNTRY_CODE, (countryName) => countryName === value);
data.countryOfResidence = countryCode;
return data;
}
}
with COUNTRY_CODE:
{
FR: 'FRANCE',
DE: 'GERMANY'
....
}