Closed PaulSinghDev closed 7 months ago
Hi Paul, yes for enum you'll need to append _enum
at the end of the field name (i.e. source
prop)
as per examples in readme:
<SelectInput
label="Status"
choices={...}
source={"status_enum"}
/>,
I will close this issue, as there is currently no way to know if a string is an enum or not unless the schema is inspected, which is out of scope of this package
I have encountered a situation where an
enum
is incorrectly being as a string and, as such, the query togetList
is being populated with acontains
field which is causing an error to throw.Looking a the code it seems as though the plugin is iterating over the keys in the
filter
which is passed viaparam
and looking to see if the column ends with_enum
I am not sure if this is the result of old behaviour or not but, when I inspect the value passed to the filter it is not appending the field type to the column name and, as such, the value is being treated as astring
.I've solved this in my resource handler with a bit of jugaad but it would be good to see this resolved: