Skip to content

Commit 5b894d1

Browse files
committed
new value
1 parent 9c347fe commit 5b894d1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/PropertyGrid.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ export class PropertyGrid extends BaseCustomWebComponentConstructorAppend {
267267
const ctl = await this.getEditorForType(pInfo, currentValue, pPath, e);
268268
if (ctl) {
269269
if (pInfo.defaultValue && ctl instanceof HTMLInputElement && ctl.value == '' && !pInfo.nullable) {
270-
ctl.placeholder = pInfo.defaultValue;
270+
if (ctl.type == 'text')
271+
ctl.placeholder = pInfo.defaultValue;
272+
else
273+
ctl.value = pInfo.defaultValue;
271274
} else if (pInfo.defaultValue && ctl instanceof HTMLSelectElement && ctl.value == '' && !pInfo.nullable) {
272275
ctl.value = pInfo.defaultValue;
273276
}

0 commit comments

Comments
 (0)