Change user size on card, save card description on click outside, prevent list deletion if any filter is active

This commit is contained in:
Maksim Eltyshev
2020-04-30 05:27:46 +05:00
parent a9f2948672
commit 712567ac57
11 changed files with 74 additions and 38 deletions

View File

@@ -65,11 +65,13 @@ const ActionsStep = React.memo(({ onNameEdit, onCardAdd, onDelete, onClose }) =>
context: 'title',
})}
</Menu.Item>
<Menu.Item className={styles.menuItem} onClick={handleDeleteClick}>
{t('action.deleteList', {
context: 'title',
})}
</Menu.Item>
{onDelete && (
<Menu.Item className={styles.menuItem} onClick={handleDeleteClick}>
{t('action.deleteList', {
context: 'title',
})}
</Menu.Item>
)}
</Menu>
</Popup.Content>
</>
@@ -79,8 +81,12 @@ const ActionsStep = React.memo(({ onNameEdit, onCardAdd, onDelete, onClose }) =>
ActionsStep.propTypes = {
onNameEdit: PropTypes.func.isRequired,
onCardAdd: PropTypes.func.isRequired,
onDelete: PropTypes.func.isRequired,
onDelete: PropTypes.func,
onClose: PropTypes.func.isRequired,
};
ActionsStep.defaultProps = {
onDelete: undefined,
};
export default withPopup(ActionsStep);

View File

@@ -114,8 +114,12 @@ List.propTypes = {
isPersisted: PropTypes.bool.isRequired,
cardIds: PropTypes.array.isRequired, // eslint-disable-line react/forbid-prop-types
onUpdate: PropTypes.func.isRequired,
onDelete: PropTypes.func.isRequired,
onDelete: PropTypes.func,
onCardCreate: PropTypes.func.isRequired,
};
List.defaultProps = {
onDelete: undefined,
};
export default List;