diff --git a/web/src/pages/project/DictEditor.tsx b/web/src/pages/project/DictEditor.tsx index d982ebd33..23a849314 100644 --- a/web/src/pages/project/DictEditor.tsx +++ b/web/src/pages/project/DictEditor.tsx @@ -5,14 +5,14 @@ import { Button } from 'semantic-ui-react' import { ThemeContext } from '../../shared/components/ThemeProvider' type InputValue = null | string | number | boolean | InputValue[] | { [key: string]: InputValue } -type Input = { [key: string]: InputValue } | string +export type DictEditorInput = { [key: string]: InputValue } | string interface DictEditorProps { - input: Input + input: DictEditorInput onChange: (json: object) => void } -const getStringFromValue = (input: Input) => { +const getStringFromValue = (input: DictEditorInput) => { // if it's a string, return it if (typeof input === 'string') { return input diff --git a/web/src/pages/project/ProjectColumnOptions.tsx b/web/src/pages/project/ProjectColumnOptions.tsx index b6924bea6..aad991caa 100644 --- a/web/src/pages/project/ProjectColumnOptions.tsx +++ b/web/src/pages/project/ProjectColumnOptions.tsx @@ -19,7 +19,7 @@ import { ProjectParticipantGridFilter, ProjectParticipantGridResponse, } from '../../sm-api' -import { DictEditor } from './DictEditor' +import { DictEditor, DictEditorInput } from './DictEditor' import { headerGroupOrder, metaSeachEntityPrefixToFilterKey, @@ -81,7 +81,7 @@ export const ProjectColumnOptions: React.FC = ({ To filter the data, you can use the button at the top of each column. - +
{headerGroupOrder.map((headerGroup) => {