Spaces:
Sleeping
Sleeping
File size: 808 Bytes
13555f3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react'
import {CalculationOptions, CommonCalculationOptionProps, optionsByType} from '../../calculations/options'
export const TableCalculationOptions = (props: CommonCalculationOptionProps): JSX.Element => {
const options = [...optionsByType.get('common')!]
if (props.property && optionsByType.get(props.property.type)) {
options.push(...optionsByType.get(props.property.type)!)
}
return (
<CalculationOptions
value={props.value}
menuOpen={props.menuOpen}
onClose={props.onClose}
onChange={props.onChange}
property={props.property}
options={options}
/>
)
}
|