Skip to content

Dependent Dropdown

This feature allows dynamic loading options for the singleSelect and the multipleSelect fields when the options for that field depend on other fields’ values. It loads options via an API call to the endpoint mentioned in endpointUrl under options when any dependencies field is updated and all required dependencies fields are non-null.

All non-required dependencies fields can be of any type, but all required dependencies fields should only be of single-select type.

All dependencies fields’ values are added to the endpoint URL as query parameters.

Usage

{
    "field": "bucket_name",
    "label": "S3 Bucket",
    "type": "singleSelect",
    "required": true,
    "options": {
        "disableonEdit": true,
        "dependencies": [
            "aws_account",
            "aws_iam_role",
            "aws_s3_region",
            "private_endpoint_enabled",
            "sts_private_endpoint_url",
            "s3_private_endpoint_url"
        ],
        "endpointUrl": "splunk_ta_aws/splunk_ta_aws_s3buckets"
    }
}

Note: When using the text type field, add debounce using the custom hook to reduce the number of API calls.