Skip to content

V3 Select Component changing indicator #964

@miyamirz

Description

@miyamirz

Hey. How do i change the indicator conditionally on the select component V3. When select component is closed, i want to show the chevronDown icon and when the list is open i want to show the chevronUp icon.

Here is my code

const SelectInput = (config: SelectInputProps): JSX.Element => {
    return (
        <div>
            <Typography type="small" color="primary" className="font-medium">{config.label}</Typography>
            <Select>
                <Select.Trigger placeholder="Select Version" indicator={<ChevronDownV2 width={20} height={20} />}/>
                <Select.List >
                    <Select.Option>Material Tailwind React</Select.Option>
                    <Select.Option>Material Tailwind HTML</Select.Option>
                    <Select.Option>Material Tailwind Vue</Select.Option>
                    <Select.Option>Material Tailwind Svelte</Select.Option>
                </Select.List>
            </Select>
        </div>
    );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions