From 5b894d14b396df529edbe906788eac6fde48cff1 Mon Sep 17 00:00:00 2001 From: jkuehner Date: Thu, 31 Oct 2024 00:41:35 +0100 Subject: [PATCH] new value --- src/PropertyGrid.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PropertyGrid.ts b/src/PropertyGrid.ts index 645e63e..6dcb745 100644 --- a/src/PropertyGrid.ts +++ b/src/PropertyGrid.ts @@ -267,7 +267,10 @@ export class PropertyGrid extends BaseCustomWebComponentConstructorAppend { const ctl = await this.getEditorForType(pInfo, currentValue, pPath, e); if (ctl) { if (pInfo.defaultValue && ctl instanceof HTMLInputElement && ctl.value == '' && !pInfo.nullable) { - ctl.placeholder = pInfo.defaultValue; + if (ctl.type == 'text') + ctl.placeholder = pInfo.defaultValue; + else + ctl.value = pInfo.defaultValue; } else if (pInfo.defaultValue && ctl instanceof HTMLSelectElement && ctl.value == '' && !pInfo.nullable) { ctl.value = pInfo.defaultValue; }