diff --git a/lib/Donors/DonorsContainer.js b/lib/Donors/DonorsContainer.js
index 25286c6a..ba028144 100644
--- a/lib/Donors/DonorsContainer.js
+++ b/lib/Donors/DonorsContainer.js
@@ -12,7 +12,7 @@ import { getDonorsFormatter } from './utils';
export function DonorsContainer({
columnMapping,
- columnWidths,
+ columnWidths: columnWidthsProp,
donors,
fields,
formatter,
@@ -62,6 +62,14 @@ export function DonorsContainer({
}
};
+ const columnWidths = useMemo(() => {
+ return columnWidthsProp || {
+ name: { min: 200, max: '50%' },
+ code: { min: 100, max: '40%' },
+ unassignDonor: '10%',
+ };
+ }, [columnWidthsProp]);
+
return (
<>
)
}
diff --git a/lib/Donors/DonorsLookup.js b/lib/Donors/DonorsLookup.js
index 51783418..8f55d7cb 100644
--- a/lib/Donors/DonorsLookup.js
+++ b/lib/Donors/DonorsLookup.js
@@ -21,6 +21,7 @@ export const DonorsLookup = ({
onAddDonors,
searchLabel,
visibleColumns,
+ columnWidths,
}) => {
const stripes = useStripes();
@@ -43,6 +44,7 @@ export const DonorsLookup = ({
visibleFilters={visibleFilters}
isMultiSelect
sortableColumns={sortableColumns}
+ columnWidths={columnWidths}
>
@@ -56,6 +58,7 @@ DonorsLookup.propTypes = {
name: PropTypes.string,
searchLabel: PropTypes.node,
visibleColumns: PropTypes.arrayOf(PropTypes.string),
+ columnWidths: PropTypes.object,
};
DonorsLookup.defaultProps = {