Atlaskit select onchange not working

Hi,

we are currently trying to add Atlaskit to our Serverapp lineup. We have the problem, that the onChange method for the select field is not firing at all, whereas other onChange (radio button) fires.

// Not firing
<Field name="select-field-test"
    label="Select Field Test"
>
    {({ fieldProps }: any) => (
        <React.Fragment>
            <Select className="single-select"
                classNamePrefix="react-select"
                placeholder="Please select a value"
                onChange={() => console.log("foo")}

                options={[
                    { label: "A", value: "a" },
                    { label: "B", value: "b" },
                    { label: "C", value: "c" },
                ]}
                {...fieldProps}
            />
        </React.Fragment>
    )}
</Field>

// works
<Field name="radio">
    {({ fieldProps }: any) => (
        <React.Fragment>
            <RadioGroup
                options={radioItems}
                {...fieldProps}
                onChange={(val: Object, action: Object) => { console.log(val) }}
            />
        </React.Fragment>
    )}
</Field>

We are using the following packages:

    "styled-components": "^3.2.6"
    "@atlaskit/form": "^8.1.0",
    "@atlaskit/select": "^13.0.4",

Can anyone help me with this?

Best regards,
Alex

Hey @alexander.auer1, I verified it. It’s firing onChange
Add sandbox link here

Hi, I can confirm that it is also not working for me.
I tried both "@atlaskit/select": "13.0.4" and "@atlaskit/select": "^13.1.1".

I’m not using css-reset, will it be the problem?

Could you please provide sandbox link :slight_smile:

Hi @ManishYadav, the problem is solved somehow, and the onChange event fired.
Thanks!

1 Like