Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
vashjs committed Feb 14, 2024
1 parent 744a62b commit bcbdc62
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/BulkEditActionMenu/BulkEditActionMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const BulkEditActionMenu = ({
capabilities,
queryRecordType,
} = useSearchParams();
const availableRecordType = capabilities || queryRecordType;

const [columnSearch, setColumnSearch] = useState('');

Expand Down Expand Up @@ -98,7 +99,7 @@ const BulkEditActionMenu = ({

const columnsOptions = columns.map(item => ({
...item,
label: item.ignoreTranslation ? item.label : intl.formatMessage({ id: `ui-bulk-edit.columns.${capabilities || queryRecordType}.${item.label}` }),
label: item.ignoreTranslation ? item.label : intl.formatMessage({ id: `ui-bulk-edit.columns.${availableRecordType}.${item.label}` }),
disabled: isLastUnselectedColumn(item.value) || !countOfRecords,
}));

Expand All @@ -111,7 +112,7 @@ const BulkEditActionMenu = ({
});

setVisibleColumns(changedColumns);
localStorage.setItem(`${BULK_VISIBLE_COLUMNS}_${capabilities || queryRecordType}`, JSON.stringify(changedColumns));
localStorage.setItem(`${BULK_VISIBLE_COLUMNS}_${availableRecordType}`, JSON.stringify(changedColumns));
};

const handleOnStartEdit = (approach) => {
Expand Down

0 comments on commit bcbdc62

Please sign in to comment.