(newField)
| 117 | }; |
| 118 | |
| 119 | onSortColumn(newField) { |
| 120 | const { query, sort } = this.props; |
| 121 | const { field: currentField, direction } = sort; |
| 122 | |
| 123 | if (currentField !== newField) { |
| 124 | return this.updateQuery(query.sortBy(`properties.${newField}`, 'asc')); |
| 125 | } |
| 126 | |
| 127 | // Toggle through sorting states: ascending, descending, or unsorted. |
| 128 | this.updateQuery( |
| 129 | query.sortBy( |
| 130 | `properties.${currentField}`, |
| 131 | direction === 'asc' ? 'desc' : undefined |
| 132 | ) |
| 133 | ); |
| 134 | } |
| 135 | |
| 136 | onSearchSubmit(queryText) { |
| 137 | const { query } = this.props; |
nothing calls this directly
no test coverage detected