Skip to content
Snippets Groups Projects
Commit 1e11a92f authored by DD Liu's avatar DD Liu
Browse files

apply to costumes, not sounds

parent eba5d0a2
Branches
Tags
No related merge requests found
......@@ -29,7 +29,7 @@ const Selector = props => {
name={item.name}
selected={index === selectedItemIndex}
onClick={onItemClick}
onDeleteButtonClick={items.length > 1 ? onDeleteClick : null}
onDeleteButtonClick={onDeleteClick}
/>
))}
</Box>
......@@ -57,7 +57,7 @@ Selector.propTypes = {
url: PropTypes.string,
name: PropTypes.string.isRequired
})),
onDeleteClick: PropTypes.func.isRequired,
onDeleteClick: PropTypes.func,
onItemClick: PropTypes.func.isRequired,
selectedItemIndex: PropTypes.number.isRequired
};
......
......@@ -109,7 +109,7 @@ class CostumeTab extends React.Component {
}]}
items={target.costumes || []}
selectedItemIndex={this.state.selectedCostumeIndex}
onDeleteClick={this.handleDeleteCostume}
onDeleteClick={target.costumes.length > 1 ? this.handleDeleteCostume : null}
onItemClick={this.handleSelectCostume}
>
{target.costumes ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment