fix(editor): add placeholder for input of database context menu (#11079)

fix: BS-2594
This commit is contained in:
zzj3720
2025-03-21 12:27:18 +00:00
parent 73807193cb
commit dd2e423112
6 changed files with 7 additions and 2 deletions
@@ -109,7 +109,7 @@ export class DatabaseBlockComponent extends CaptionedBlockComponent<DatabaseBloc
items: [
menu.input({
initialValue: this.model.props.title.toString(),
placeholder: 'Untitled',
placeholder: 'Database title',
onChange: text => {
this.model.props.title.replace(
0,
@@ -110,6 +110,7 @@ export class MenuInput extends MenuFocusable {
this.menu.setFocusOnly(this);
}}"
@input="${this.onInput}"
placeholder="${this.data.placeholder ?? ''}"
@keydown="${this.onKeydown}"
@copy="${this.stopPropagation}"
@paste="${this.stopPropagation}"
@@ -204,7 +204,7 @@ export class MenuComponent
}
return html`
<div
style="display:flex;align-items:center;gap: 4px;min-width: 300px;padding:3px 4px 3px 2px"
style="display:flex;align-items:center;gap: 4px;padding:3px 4px 3px 2px"
@mouseenter="${() => this.menu.closeSubMenu()}"
>
${title.onBack
@@ -14,6 +14,7 @@ export const inputConfig = (property: Property) => {
</div>
`,
initialValue: property.name$.value,
placeholder: 'Property name',
onChange: text => {
property.nameSet(text);
},
@@ -26,6 +27,7 @@ export const inputConfig = (property: Property) => {
</div>
`,
initialValue: property.name$.value,
placeholder: 'Property name',
onComplete: text => {
property.nameSet(text);
},
@@ -236,6 +236,7 @@ export const popViewOptions = (
items.push(
menu.input({
initialValue: view.name$.value,
placeholder: 'View name',
onChange: text => {
view.nameSet(text);
},
@@ -164,6 +164,7 @@ export class DataViewHeaderViews extends WidgetBase {
items: [
menu.input({
initialValue: view.name$.value,
placeholder: 'View name',
onChange: text => {
view.nameSet(text);
},