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

Plots tab option validation did not allow for the "none" selected value #4420

Merged
merged 2 commits into from
Nov 17, 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion end-to-end-test/remote/specs/core/quickSearch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Quick Search', () => {
});

it('should give results for genes', () => {
$('strong=444 more genes (click to load 20 more)').click();
$('strong=448 more genes (click to load 20 more)').click();
$('strong=ADAM12').waitForExist();
$('strong=ADAM15').click();
$('a=ADAM15').waitForExist({ timeout: 60000 });
Expand Down
8 changes: 5 additions & 3 deletions src/pages/resultsView/plots/PlotsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -795,14 +795,16 @@ export default class PlotsTab extends React.Component<IPlotsTabProps, {}> {

// due to legacy urls, it's possible that selections can be made which
// are no longer avaiable. this handles that case
const selectedDataTypeDoesNotExists = !_.some(
const selectedDataTypeDoesNotExist = !_.some(
dataTypeOptions,
o => o.value === this._dataType
o =>
this._dataType === NONE_SELECTED_OPTION_STRING_VALUE ||
o.value === this._dataType
);

if (
(this._dataType === undefined && dataTypeOptions.length) ||
selectedDataTypeDoesNotExists
selectedDataTypeDoesNotExist
) {
// return computed default if _dataType is undefined and if there are options to select a default value from
if (
Expand Down