Skip to content

Commit

Permalink
[QUICK BUGFIX][risk=no] Fix Dataset Dropdown on Draft DARs (#1870)
Browse files Browse the repository at this point in the history
* fix draft console table

* fix for only drafts

* make robust against case changes
  • Loading branch information
connorlbark authored Oct 31, 2022
1 parent 55d78ca commit 5be3231
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/dar_collection_table/DarCollectionTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export const DarCollectionTable = function DarCollectionTable(props) {
[pageCount]
);

const rowWrapper = useCallback(({renderedRow, rowData}) => {
const showDatasetDropdownWrapper = useCallback(({renderedRow, rowData}) => {
const darCollectionId = rowData[0].id;

if (collectionIsExpanded(darCollectionId)) {
Expand Down Expand Up @@ -322,7 +322,7 @@ export const DarCollectionTable = function DarCollectionTable(props) {
goToPage,
changeTableSize,
}),
rowWrapper,
rowWrapper: showDatasetDropdownWrapper,
sort,
onSort: (sort) => {
Storage.setCurrentUserSettings(storageDarCollectionSort, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export function darCodeCellData({darCode = '- -', darCollectionId, collectionIsE
h((collectionIsExpanded ? ExpandLess : ExpandMore), {
id: `${darCollectionId}_dropdown`,
className: `sort-icon dar-expand-dropdown-arrow ${collectionIsExpanded ? 'sort-icon-up' : 'sort-icon-down'}`,
isRendered: toLower(status) !== 'draft',
onClick: () => {
updateCollectionIsExpanded(!collectionIsExpanded);
},
Expand Down

0 comments on commit 5be3231

Please sign in to comment.