Skip to content

Commit

Permalink
fix(list): datasource prop should always be controlled (#493)
Browse files Browse the repository at this point in the history
affects: @gio-design/components, website

ISSUES CLOSED: #250

Co-authored-by: huskylengcb <649569822@qq.com>
  • Loading branch information
Lee Hon and huskylengcb authored Nov 24, 2020
1 parent 180b19a commit 78e213f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/components/list/core.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class SelectCore extends React.Component<SelectCoreProps & ConfigConsumerProps,
return { stateChanged: false };
}

if (nextProps.value) {
if (nextProps.value || nextProps.options) {
return {
value: nextProps.value,
options: nextProps.options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ group:

## 参数说明

### Modal
### List

| 参数 | 说明 | 类型 | 默认值 |
| ------------- | -------------------------------- | --------------------------------------------------------------------------- | -------- |
Expand Down

1 comment on commit 78e213f

@vercel
Copy link

@vercel vercel bot commented on 78e213f Nov 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.