mirror of
https://github.com/status-im/sourcecred.git
synced 2025-02-04 08:44:00 +00:00
s/typeFilter/topLevelFilter/g
Test plan: No change, it's just a variable rename. Paired with @wchargin
This commit is contained in:
parent
7fc31f6a26
commit
2f0f523065
@ -16,7 +16,7 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
typeFilter: ?{|
|
topLevelFilter: ?{|
|
||||||
+pluginName: string,
|
+pluginName: string,
|
||||||
+type: string,
|
+type: string,
|
||||||
|},
|
|},
|
||||||
@ -39,7 +39,7 @@ function nodeDescription(graph, address) {
|
|||||||
export class PagerankTable extends React.Component<Props, State> {
|
export class PagerankTable extends React.Component<Props, State> {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.state = {typeFilter: null};
|
this.state = {topLevelFilter: null};
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -89,9 +89,9 @@ export class PagerankTable extends React.Component<Props, State> {
|
|||||||
<label>
|
<label>
|
||||||
Filter by contribution type:{" "}
|
Filter by contribution type:{" "}
|
||||||
<select
|
<select
|
||||||
value={JSON.stringify(this.state.typeFilter)}
|
value={JSON.stringify(this.state.topLevelFilter)}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
this.setState({typeFilter: JSON.parse(e.target.value)});
|
this.setState({topLevelFilter: JSON.parse(e.target.value)});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<option value={JSON.stringify(null)}>Show all</option>
|
<option value={JSON.stringify(null)}>Show all</option>
|
||||||
@ -113,9 +113,9 @@ export class PagerankTable extends React.Component<Props, State> {
|
|||||||
.slice()
|
.slice()
|
||||||
.filter(
|
.filter(
|
||||||
(n) =>
|
(n) =>
|
||||||
this.state.typeFilter
|
this.state.topLevelFilter
|
||||||
? n.address.pluginName === this.state.typeFilter.pluginName &&
|
? n.address.pluginName === this.state.topLevelFilter.pluginName &&
|
||||||
n.address.type === this.state.typeFilter.type
|
n.address.type === this.state.topLevelFilter.type
|
||||||
: true
|
: true
|
||||||
)
|
)
|
||||||
.sort((a, b) => {
|
.sort((a, b) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user