2

In default semantic-ui we can do this option: https://github.com/Semantic-Org/Semantic-UI/commit/b4ae26d24f75886c3d5f6fc4f00e176f09705a13 But, how to do it in semantic-ui-react? Google nothing say about it, please, I need help.

What I'm trying to achieve: I'm using redux-form. In my form present semantic component <Form.Select multiple ....> and after success submit - call to redux-form method reset. All is fine, form is clear... but not dropdown/select field. Any ideas?

1 Answer 1

2

I solved the problem as follows:

Semantic-ui-react props value set to the current value of the field.

<Form.Select
                    name={input.name}
                    options={options}
                    label={label}
                    placeholder={placeholder}
                    search
                    multiple
                    selectOnBlur={selectOnBlur}
                    onFocus={::this.handleFocus}
                    onBlur={::this.handleBlur}
                    onChange={::this.handleChange}
                    defaultValue={defaultValue || []}
                    value={input.value}
                    loading={loading} />
Sign up to request clarification or add additional context in comments.

1 Comment

how did you get the value of the Select Button? I'm struggling ... really struggling

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.