Skip to content

Commit

Permalink
fix(lesmis): RN-1335: Fix DataFetchingTable Action Label (#5755)
Browse files Browse the repository at this point in the history
* Update DataFetchingTable.jsx

* Update users.jsx
  • Loading branch information
tcaiger authored Jul 3, 2024
1 parent 6db50d8 commit 9f2506b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions packages/admin-panel/src/routes/users/users.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ const CREATE_CONFIG = {
optionsEndpoint: 'countries',
optionLabelKey: 'name',
optionValueKey: 'name',
labelTooltip: 'Select the country to grant this user access to',
type: 'checkboxList',
pageSize: 'ALL',
secondaryLabel: 'Select the country to grant this user access to',
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const DataFetchingTableComponent = memo(
baseFilter,
basePath,
resourceName,
actionLabel = 'Action',
actionLabel,
}) => {
const formattedColumns = useMemo(() => {
const cols = columns.map(column => formatColumnForReactTable(column));
Expand Down Expand Up @@ -143,7 +143,7 @@ const DataFetchingTableComponent = memo(
const buttonWidths = buttonColumns.reduce((acc, { width }) => acc + (width || 60), 0);
// Group all button columns into a single column so they can be displayed together under a single header
const singleButtonColumn = {
Header: actionLabel,
Header: actionLabel || 'Action',
maxWidth: buttonWidths,
width: buttonWidths,
// eslint-disable-next-line react/prop-types
Expand Down

0 comments on commit 9f2506b

Please sign in to comment.