| 105 | } |
| 106 | |
| 107 | onFilter () { |
| 108 | this.close(); |
| 109 | let filters = this.state.filters, |
| 110 | local = this.props.local; |
| 111 | this.setState({ resultText: this.formatText(filters) }); |
| 112 | if (this.props.onFilter) { |
| 113 | let novs = []; |
| 114 | filters.forEach((f, i) => { |
| 115 | if (f.op && f.value) { |
| 116 | let nov = { name: f.name, op: f.op, value: f.value }; |
| 117 | if (local) { |
| 118 | nov.func = this.refs[`fi${i}`].getFunc(); |
| 119 | } |
| 120 | novs.push(nov); |
| 121 | } |
| 122 | }); |
| 123 | this.props.onFilter(novs); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | formatText (filters) { |
| 128 | let text = []; |