fix: reset gene set colorScale on gene set deletion (#2264)

This commit is contained in:
Severiano Badajoz
2021-06-30 16:46:44 -07:00
committed by GitHub
parent 5007d307a2
commit b8b1d0dd9e
+6 -1
View File
@@ -16,7 +16,7 @@ The behavior manifest in these action creators:
Add a gene to a gene set, will:
* drop index & clear selection state on the gene set summary
* will NOT touch the selection state for the gene
Note that crossfilter indices are lazy created, as needed.
*/
@@ -26,6 +26,11 @@ export const genesetDelete = (genesetName) => (dispatch, getState) => {
const gs = genesets?.genesets?.get(genesetName) ?? {};
const geneSymbols = Array.from(gs.genes.keys());
const obsCrossfilter = dropGeneset(dispatch, state, genesetName, geneSymbols);
if (genesetName === state.colors.colorAccessor) {
dispatch({
type: "reset colorscale",
});
}
dispatch({
type: "geneset: delete",
genesetName,