mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-02 13:38:12 +08:00
Prevent category collapsing on annotation edit, # of cells on add label button (#1204)
* collapse functionality * expand collapse
This commit is contained in:
@@ -9,7 +9,8 @@ import { labelPrompt, isLabelErroneous } from "./labelUtil";
|
||||
categoricalSelection: state.categoricalSelection,
|
||||
annotations: state.annotations,
|
||||
universe: state.universe,
|
||||
ontology: state.ontology
|
||||
ontology: state.ontology,
|
||||
crossfilter: state.crossfilter
|
||||
}))
|
||||
class Category extends React.PureComponent {
|
||||
constructor(props) {
|
||||
@@ -73,7 +74,7 @@ class Category extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
const { newLabelText } = this.state;
|
||||
const { metadataField, annotations, ontology } = this.props;
|
||||
const { metadataField, annotations, ontology, crossfilter } = this.props;
|
||||
const ontologyEnabled = ontology?.enabled ?? false;
|
||||
|
||||
return (
|
||||
@@ -91,7 +92,7 @@ class Category extends React.PureComponent {
|
||||
instruction={this.instruction(newLabelText)}
|
||||
cancelTooltipContent="Close this dialog without adding a label."
|
||||
primaryButtonText="Add label"
|
||||
secondaryButtonText="Add label and assign currently selected cells"
|
||||
secondaryButtonText={`Add label and assign ${crossfilter.countSelected()} currently selected cells`}
|
||||
handleSecondaryButtonSubmit={this.addLabelAndAssignCells}
|
||||
text={newLabelText}
|
||||
validationError={this.labelNameError(newLabelText)}
|
||||
|
||||
Reference in New Issue
Block a user