Skip to content

Commit

Permalink
fix: add donors lookup specific column props
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed Nov 15, 2023
1 parent fc0d975 commit 1d8373c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/Donors/DonorsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { useIntl } from 'react-intl';

import { useStripes } from '@folio/stripes/core';

import { defaultContainerVisibleColumns } from './constants';
import {
defaultContainerVisibleColumns,
pluginVisibleColumns,
} from './constants';
import { DonorsList } from './DonorsList';
import { DonorsLookup } from './DonorsLookup';
import { getDonorsFormatter } from './utils';
Expand All @@ -19,6 +22,7 @@ export function DonorsContainer({
formatter,
id,
onRemove,
pluginVisibleColumns: pluginVisibleColumnsProp,
setDonorIds,
searchLabel,
showTriggerButton,
Expand Down Expand Up @@ -81,7 +85,7 @@ export function DonorsContainer({
onAddDonors={onAddDonors}
name={id}
searchLabel={searchLabel}
visibleColumns={visibleColumns}
visibleColumns={pluginVisibleColumnsProp}
/>
)
}
Expand All @@ -102,10 +106,12 @@ DonorsContainer.propTypes = {
setDonorIds: PropTypes.func.isRequired,
showTriggerButton: PropTypes.bool,
visibleColumns: PropTypes.arrayOf(PropTypes.string),
pluginVisibleColumns: PropTypes.arrayOf(PropTypes.string),
};

DonorsContainer.defaultProps = {
onRemove: noop,
showTriggerButton: true,
visibleColumns: defaultContainerVisibleColumns,
pluginVisibleColumns,
};

0 comments on commit 1d8373c

Please sign in to comment.