diff --git a/client/src/containers/Vendors/VendorActionsBar.js b/client/src/containers/Vendors/VendorActionsBar.js index eddc6ce52..cae1e879c 100644 --- a/client/src/containers/Vendors/VendorActionsBar.js +++ b/client/src/containers/Vendors/VendorActionsBar.js @@ -16,11 +16,20 @@ import { useHistory } from 'react-router-dom'; import Icon from 'components/Icon'; import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'; -import { DashboardActionViewsList } from 'components'; -import withResourceDetail from 'containers/Resources/withResourceDetails'; +import { If, DashboardActionViewsList } from 'components'; + +import withVendors from './withVendors'; +import withVendorActions from './withVendorActions'; import { compose } from 'utils'; function VendorActionsBar({ + // #withVendors + vendorViews, + + // #withVendorActions + addVendorsTableQueries, + changeVendorView, + // #ownProps selectedRows = [], }) { @@ -32,11 +41,25 @@ function VendorActionsBar({ history.push('/vendors/new'); }, [history]); + const hasSelectedRows = useMemo(() => selectedRows.length > 0, [ + selectedRows, + ]); + const handleTabChange = (viewId) => { + changeVendorView(viewId.id || -1); + addVendorsTableQueries({ + custom_view_id: viewId.id || null, + }); + }; + return ( - +