Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Oct 30, 2024
1 parent b25412f commit 47f7237
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PropertyGrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ export class PropertyGrid extends BaseCustomWebComponentConstructorAppend {
const pInfo = <IProperty>node.data.property;
const ctl = await this.getEditorForType(pInfo, currentValue, pPath, e);
if (ctl) {
if (pInfo.defaultValue && (ctl as HTMLInputElement).value == '' && !pInfo.nullable) {
(ctl as HTMLInputElement).placeholder = pInfo.defaultValue;
} else if (pInfo.defaultValue && (ctl as HTMLSelectElement).value == '' && !pInfo.nullable) {
(ctl as HTMLSelectElement).value = pInfo.defaultValue;
if (pInfo.defaultValue && ctl instanceof HTMLInputElement && ctl.value == '' && !pInfo.nullable) {
ctl.placeholder = pInfo.defaultValue;
} else if (pInfo.defaultValue && ctl instanceof HTMLSelectElement && ctl.value == '' && !pInfo.nullable) {
ctl.value = pInfo.defaultValue;
}
ctl.style.flexGrow = '1';
ctl.style.width = '100%';
Expand Down

0 comments on commit 47f7237

Please sign in to comment.