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

TASK-6127 - Stock phrases dropdown menu in observations affects previous dropdown menus functionality #910

Merged
merged 4 commits into from
May 7, 2024
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 @@ -605,6 +605,7 @@ export default class SampleCancerVariantStatsBrowser extends LitElement {
display: {
style: "margin: 0px 25px 0px 0px",
modalTitle: "Display Settings",
modalButtonName: "Settings",
modalButtonIcon: "fas fa-cog",
modalButtonClassName: "btn btn-primary",
labelWidth: 4,
Expand Down Expand Up @@ -653,6 +654,7 @@ export default class SampleCancerVariantStatsBrowser extends LitElement {
display: {
style: "margin: 0px 25px 0px 0px",
modalTitle: "Save Variant Stats",
modalButtonName: "Save",
modalButtonIcon: "fas fa-save",
modalButtonClassName: "btn btn-primary",
labelWidth: 3,
Expand Down
15 changes: 15 additions & 0 deletions src/webcomponents/variant/custom/steiner-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class SteinerReport extends LitElement {
"No pathogenic variants identified.",
"Results related to other genetic conditions of medical significance (additional findings).",
"Results that are not expected to impact participant health but may be relevant to family members or children.",
"The quality of the data is sufficient for mutational signature analysis and to look for potential driver mutations.",
"The data for this sample is below the quality required to perform WGS analysis.",
];

this.somaticSample = null;
Expand Down Expand Up @@ -318,6 +320,18 @@ class SteinerReport extends LitElement {
this.requestUpdate();
}

onFieldChange(event) {
// Josemi Note 2024-04-26: we need to force a refresh only if user selects a value from the dropdowns displayed
// on the Mutational Signatures section of the report
const param = event?.detail?.param;
if (param === "selectedSnvSignature" || param === "selectedSvSignature" || param === "selectedHrdetect") {
this._data = {
...this._data,
};
this.requestUpdate();
}
}

generateSignaturesDropdown(signatures, type) {
return (signatures || [])
.filter(signature => (signature?.type || "").toUpperCase() === type)
Expand Down Expand Up @@ -375,6 +389,7 @@ class SteinerReport extends LitElement {
<data-form
.data="${this._data}"
.config="${this._config}"
@fieldChange="${e => this.onFieldChange(e)}"
@clear="${this.onClear}"
@submit="${this.onRun}">
</data-form>
Expand Down
Loading