diff --git a/webview/src/ConfigEditor/fields.tsx b/webview/src/ConfigEditor/fields.tsx index f0587a1..f1758c1 100644 --- a/webview/src/ConfigEditor/fields.tsx +++ b/webview/src/ConfigEditor/fields.tsx @@ -54,9 +54,11 @@ export function putty(config: FileSystemConfig, onChange: FSCChanged<'putty'>): } export function host(config: FileSystemConfig, onChange: FSCChanged<'host'>): React.ReactElement { - const callback = (value?: string) => onChange('host', value); + const callback = (newValue?: string) => onChange('host', newValue === '' ? (true as any) : newValue); const description = 'Hostname or IP address of the server. Supports environment variables, e.g. $HOST'; - return + const values = ['']; + const value = (config.host as any) === true ? '' : config.host; + return } export function port(config: FileSystemConfig, onChange: FSCChanged<'port'>): React.ReactElement {