Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select 支持只读选项 #2034

Closed
afc163 opened this issue Jun 14, 2016 · 2 comments
Closed

Select 支持只读选项 #2034

afc163 opened this issue Jun 14, 2016 · 2 comments

Comments

@afc163
Copy link
Member

afc163 commented Jun 14, 2016

@afc163
Copy link
Member Author

afc163 commented Jun 14, 2016

  <Select
    multiple
    style={{ width: '100%' }}
    placeholder="Please select"
    defaultValue={['1', '2']}
    onChange={handleChange}
  >
    <Option value="1">111</Option>
    <Option value="2">222</Option>
    <Option value="3">333</Option>
    <Option value="4">444</Option>
  </Select>

改完后可以这样定义只读预选项,例子中 1 和 2 将为预选项,无法移除。

@lock
Copy link

lock bot commented May 5, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants