New: Add details and delete buttons to file editor table

This commit is contained in:
ta264
2021-04-07 16:23:55 +01:00
parent 427f76fbe0
commit 400f77584d
5 changed files with 141 additions and 6 deletions
@@ -26,6 +26,11 @@ const columns = [
name: 'quality',
label: 'Quality',
isVisible: true
},
{
name: 'actions',
columnLabel: 'Actions',
isVisible: true
}
];
@@ -117,7 +122,8 @@ class BookFileEditorTableContent extends Component {
isPopulated,
error,
items,
qualities
qualities,
dispatchDeleteBookFile
} = this.props;
const {
@@ -178,6 +184,7 @@ class BookFileEditorTableContent extends Component {
isSelected={selectedState[item.id]}
{...item}
onSelectedChange={this.onSelectedChange}
deleteBookFile={dispatchDeleteBookFile}
/>
);
})
@@ -230,7 +237,8 @@ BookFileEditorTableContent.propTypes = {
items: PropTypes.arrayOf(PropTypes.object).isRequired,
qualities: PropTypes.arrayOf(PropTypes.object).isRequired,
onDeletePress: PropTypes.func.isRequired,
onQualityChange: PropTypes.func.isRequired
onQualityChange: PropTypes.func.isRequired,
dispatchDeleteBookFile: PropTypes.func.isRequired
};
export default BookFileEditorTableContent;