RESTool
RESTool copied to clipboard
OptionSource DisplayPath & ValuePath
Im trying to use optionSource
but using the below"works" however the displayPath
and valuePath
are not working. Just Option 0-17 (matches records retrieved from the api)
Im using the CDN version
Ideally we need to split like the dataPath
https://github.com/dsternlicht/RESTool/blob/c14058f47513981d3e9169783b784b873ce1661e/src/helpers/data.helpers.ts#L14
Maybe we can trigger the same function on displayPath
& valuePath
to traverse the object?
https://github.com/dsternlicht/RESTool/blob/c14058f47513981d3e9169783b784b873ce1661e/src/components/formRow/formRow.comp.tsx#L52
const { extractDataByDataPath( valueResult , optionSourceData , valuePath), extractDataByDataPath( displayResult , optionSourceData , displayPath) } = optionSource
@Keelan nice catch. Can you open a PR and fix?
@dsternlicht Did my best! (not a js guy)
https://github.com/dsternlicht/RESTool/pull/171