Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-2331: UDW submit button shows up in inconsistent way #2036

Merged
merged 2 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ const BookmarksList = ({ setBookmarkedLocationMarked, itemsPerPage }) => {
dispatchLoadedLocationsAction({ type: 'CLEAR_LOCATIONS' });
setBookmarkedLocationMarked(bookmark.id);

if (!multiple && !isNotSelectable) {
if (!multiple) {
dispatchSelectedLocationsAction({ type: 'CLEAR_SELECTED_LOCATIONS' });
dispatchSelectedLocationsAction({ type: 'ADD_SELECTED_LOCATION', location: bookmark });

if (!isNotSelectable) {
dispatchSelectedLocationsAction({ type: 'ADD_SELECTED_LOCATION', location: bookmark });
}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ const ContentTableItem = ({ location }) => {
}
);

if (!multiple && !isNotSelectable) {
if (!multiple) {
dispatchSelectedLocationsAction({ type: 'CLEAR_SELECTED_LOCATIONS' });
dispatchSelectedLocationsAction({ type: 'ADD_SELECTED_LOCATION', location });

if (!isNotSelectable) {
dispatchSelectedLocationsAction({ type: 'ADD_SELECTED_LOCATION', location: location });
}
}
};
const renderToggleSelectionButton = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ const FinderLeaf = ({ location }) => {
dispatchLoadedLocationsAction({ type: 'CUT_LOCATIONS', locationId: location.id });
dispatchLoadedLocationsAction({ type: 'UPDATE_LOCATIONS', data: { parentLocationId: location.id, subitems: [] } });

if (!multiple && !isNotSelectable) {
if (!multiple) {
dispatchSelectedLocationsAction({ type: 'CLEAR_SELECTED_LOCATIONS' });
dispatchSelectedLocationsAction({ type: 'ADD_SELECTED_LOCATION', location });

if (!isNotSelectable) {
dispatchSelectedLocationsAction({ type: 'ADD_SELECTED_LOCATION', location });
}
}
};
}
const renderToggleSelectionButton = () => {
if (!multiple || isNotSelectable) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ const GridViewItem = ({ location, version }) => {

setMarkedLocationId(location.id);

if (!multiple && !isNotSelectable) {
if (!multiple) {
dispatchSelectedLocationsAction({ type: 'CLEAR_SELECTED_LOCATIONS' });
dispatchSelectedLocationsAction({ type: 'ADD_SELECTED_LOCATION', location });

if (!isNotSelectable) {
dispatchSelectedLocationsAction({ type: 'ADD_SELECTED_LOCATION', location });
}
}
};
const loadLocation = ({ nativeEvent }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ const TreeView = ({ itemsPerPage }) => {
setMarkedLocationId(locationId);
dispatchLoadedLocationsAction({ type: 'SET_LOCATIONS', data: locationsMap });

if (!multiple && !isNotSelectable) {
dispatchSelectedLocationsAction({ type: 'REPLACE_SELECTED_LOCATIONS', locations: [{ location }] });
if (!multiple) {
dispatchSelectedLocationsAction({ type: 'CLEAR_SELECTED_LOCATIONS' });

if (!isNotSelectable) {
dispatchSelectedLocationsAction({ type: 'REPLACE_SELECTED_LOCATIONS', locations: [{ location }] });
}
}
}
);
Expand Down