fix list widget default values

This commit is contained in:
Shawn Erquhart 2017-12-30 17:33:51 -05:00
parent 024af08e48
commit b1006a9173

View File

@ -71,7 +71,7 @@ export default class ListControl extends Component {
super(props);
const { field, value } = props;
const allItemsCollapsed = field.get('collapsed', true);
const itemsCollapsed = Array(value.size).fill(allItemsCollapsed);
const itemsCollapsed = value && Array(value.size).fill(allItemsCollapsed);
this.state = {
itemsCollapsed: List(itemsCollapsed),