all or none becomes a checkbox

This commit is contained in:
Colin Megill
2018-01-08 14:04:02 -08:00
parent 5140020c08
commit 7cea939926
4 changed files with 47 additions and 42 deletions
+19 -19
View File
@@ -26,14 +26,6 @@ class CategoryValue extends React.Component {
});
}
toggleOnlyThis() {
this.props.dispatch({
type: "categorical metadata filter only this",
metadataField: this.props.metadataField,
value: this.props.value
})
}
render () {
if (!this.props.categoricalAsBooleansMap) return null
@@ -66,17 +58,6 @@ class CategoryValue extends React.Component {
}}>
{this.props.count}
</p>
<span
onClick={this.toggleOnlyThis.bind(this)}
style={{
fontFamily: globals.accentFont,
fontSize: 10,
fontWeight: 100,
fontStyle: "italic",
cursor: "pointer",
}}>
{"only"}
</span>
</div>
)
}
@@ -84,6 +65,25 @@ class CategoryValue extends React.Component {
export default CategoryValue;
// toggleOnlyThis() {
// this.props.dispatch({
// type: "categorical metadata filter none of these",
// metadataField: this.props.metadataField,
// value: this.props.value
// })
// }
// <span
// onClick={this.toggleOnlyThis.bind(this)}
// style={{
// fontFamily: globals.accentFont,
// fontSize: 10,
// fontWeight: 100,
// fontStyle: "italic",
// cursor: "pointer",
// }}>
// {"only"}
// </span>
// onClick={selected ? this.toggleOff.bind(this) : this.toggleOn.bind(this)}
// toggleOn() {
// this.props.dispatch(