Skip to content

Commit

Permalink
new value
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Oct 30, 2024
1 parent 9c347fe commit 5b894d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/PropertyGrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5b894d1

Please sign in to comment.