I'm creating a sortable image grid custom component, and I'd like to be able to make it as customisable as the Image Grid component — i.e. where I can tell it what property on the object to get the source of the image from e.g. {{ item.cloudinaryURL }}
However I can't see any useful primitive that might get me there. Has anyone identified a way around this limitation?
I am using Retool Cloud/latest version of @tryretool/custom-component-support
1 Like
Hi Dave!
Thanks for posting this question.
Im also working on finding a solution for this. Im afraid that the Retool Custom component dose not currently support that Mapping UI when building custom component.
This means that you have to hardcode map the input (after adding it using the "useStateArray".
The other workaround is to add multiple "string" parameters to your component that will refer to the keys to be used for the array mapping. e.g:
Data : [...] /array/
Caption Key: "camption"
Tooltip Key: "helper"
Then you in your component code you can use these given keys to read the correct properties from the given array.
I hope that I have explained this well, it's not a perfect method but it's a doable workaround.
Have a nice day!
Let me know if you need any help!