feat: fix items list datatable.

This commit is contained in:
a.bouhuolia
2021-02-08 13:17:11 +02:00
parent adac2386bb
commit 304f0c9ae5
43 changed files with 777 additions and 835 deletions

View File

@@ -1,4 +1,4 @@
import React from 'react';
import React, { useEffect } from 'react';
import { useParams } from 'react-router-dom';
import { ItemFormProvider } from './ItemFormProvider';
@@ -12,8 +12,21 @@ import { compose } from 'utils';
/**
* Item form page.
*/
function ItemFormPage() {
function ItemFormPage({
// #withDashboardActions
setDashboardBackLink
}) {
const { id } = useParams();
useEffect(() => {
// Show the back link on dashboard topbar.
setDashboardBackLink(true);
return () => {
// Hide the back link on dashboard topbar.
setDashboardBackLink(false);
};
}, [setDashboardBackLink]);
return (
<ItemFormProvider itemId={id}>
@@ -24,4 +37,6 @@ function ItemFormPage() {
);
}
export default compose(withDashboardActions)(ItemFormPage);
export default compose(
withDashboardActions,
)(ItemFormPage);