(ex: InputSearchExpression, column: SandDance.types.Column)
| 94 | } |
| 95 | |
| 96 | function getOperators(ex: InputSearchExpression, column: SandDance.types.Column) { |
| 97 | let anySelected = false; |
| 98 | const validOperators = getValidOperators(column); |
| 99 | const options = validOperators.map(validoperator => { |
| 100 | const [op, text] = validoperator; |
| 101 | const selected = ex.operator === op; |
| 102 | anySelected = anySelected || selected; |
| 103 | const option: FluentUITypes.IDropdownOption = { |
| 104 | key: op, |
| 105 | text, |
| 106 | data: op, |
| 107 | selected, |
| 108 | }; |
| 109 | return option; |
| 110 | }); |
| 111 | if (!anySelected) { |
| 112 | options[0].selected = true; |
| 113 | } |
| 114 | return options; |
| 115 | } |
| 116 | |
| 117 | function getDistinctValues(data: object[], columnName: string) { |
| 118 | const distinctMap = {}; |
no test coverage detected