refactor: add none option to optional select

This commit is contained in:
Carlos Valente
2025-09-05 06:28:06 +02:00
committed by Alex Christoffer Rasmussen
parent bffa863fb4
commit a2505c838b
4 changed files with 21 additions and 9 deletions
@@ -13,6 +13,7 @@ import { isStringBoolean } from '../viewers/common/viewUtils';
export const getOperatorOptions = (customFields: CustomFields, timeFormat: string): ViewOption[] => {
const fieldOptions = makeOptionsFromCustomFields(customFields, [
{ value: 'none', label: 'None' },
{ value: 'title', label: 'Title' },
{ value: 'note', label: 'Note' },
]);
@@ -38,7 +39,7 @@ export const getOperatorOptions = (customFields: CustomFields, timeFormat: strin
description: 'Field to be shown in the second line of text',
type: 'option',
values: fieldOptions,
defaultValue: '',
defaultValue: 'none',
},
{
id: 'subscribe',