Currently, if one wants to use nested property for optionLabel/optionValue/optionInfo it's not possible. Let me illustrate on an example:
We have an array of options of the following type:
interface Option {
name: string;
address: {
city: string;
};
}
And we want to use it in a CpsSelect:
<cps-select
[options]="options"
optionLabel="address.city" <!-- currently not possible -->
>
</cps-select>
I'd suggest supporting not only string type but also a Function type for those inputs, so that a user can define custom function that will take option object and would return value to be used for optionLabel/Value/Info, e.g.:
const getCity = (option: Option): string => option.address.city;
<cps-select
[options]="options"
optionLabel="getCity"
>
</cps-select>
Components that might also support this:
CpsSelect/CpsTreeSelect
CpsAutocomplete/CpsTreeAutocomplete