Field options: show field name when title option config is empty (#24335)

This commit is contained in:
Dominik Prokop
2020-05-06 14:52:17 +02:00
committed by GitHub
parent 7219d9bd7f
commit 368594e89e
@@ -14,7 +14,9 @@ export const StringValueEditor: React.FC<FieldConfigEditorProps<string, StringFi
placeholder={item.settings?.placeholder}
value={value || ''}
rows={item.settings?.useTextarea && item.settings.rows}
onChange={(e: React.FormEvent<any>) => onChange(e.currentTarget.value)}
onChange={(e: React.FormEvent<any>) =>
onChange(e.currentTarget.value.trim() === '' ? undefined : e.currentTarget.value)
}
/>
);
};