fix(editor): add placeholder for input of database context menu (#11079)
fix: BS-2594
This commit is contained in:
@@ -109,7 +109,7 @@ export class DatabaseBlockComponent extends CaptionedBlockComponent<DatabaseBloc
|
|||||||
items: [
|
items: [
|
||||||
menu.input({
|
menu.input({
|
||||||
initialValue: this.model.props.title.toString(),
|
initialValue: this.model.props.title.toString(),
|
||||||
placeholder: 'Untitled',
|
placeholder: 'Database title',
|
||||||
onChange: text => {
|
onChange: text => {
|
||||||
this.model.props.title.replace(
|
this.model.props.title.replace(
|
||||||
0,
|
0,
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ export class MenuInput extends MenuFocusable {
|
|||||||
this.menu.setFocusOnly(this);
|
this.menu.setFocusOnly(this);
|
||||||
}}"
|
}}"
|
||||||
@input="${this.onInput}"
|
@input="${this.onInput}"
|
||||||
|
placeholder="${this.data.placeholder ?? ''}"
|
||||||
@keydown="${this.onKeydown}"
|
@keydown="${this.onKeydown}"
|
||||||
@copy="${this.stopPropagation}"
|
@copy="${this.stopPropagation}"
|
||||||
@paste="${this.stopPropagation}"
|
@paste="${this.stopPropagation}"
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ export class MenuComponent
|
|||||||
}
|
}
|
||||||
return html`
|
return html`
|
||||||
<div
|
<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()}"
|
@mouseenter="${() => this.menu.closeSubMenu()}"
|
||||||
>
|
>
|
||||||
${title.onBack
|
${title.onBack
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export const inputConfig = (property: Property) => {
|
|||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
initialValue: property.name$.value,
|
initialValue: property.name$.value,
|
||||||
|
placeholder: 'Property name',
|
||||||
onChange: text => {
|
onChange: text => {
|
||||||
property.nameSet(text);
|
property.nameSet(text);
|
||||||
},
|
},
|
||||||
@@ -26,6 +27,7 @@ export const inputConfig = (property: Property) => {
|
|||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
initialValue: property.name$.value,
|
initialValue: property.name$.value,
|
||||||
|
placeholder: 'Property name',
|
||||||
onComplete: text => {
|
onComplete: text => {
|
||||||
property.nameSet(text);
|
property.nameSet(text);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ export const popViewOptions = (
|
|||||||
items.push(
|
items.push(
|
||||||
menu.input({
|
menu.input({
|
||||||
initialValue: view.name$.value,
|
initialValue: view.name$.value,
|
||||||
|
placeholder: 'View name',
|
||||||
onChange: text => {
|
onChange: text => {
|
||||||
view.nameSet(text);
|
view.nameSet(text);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ export class DataViewHeaderViews extends WidgetBase {
|
|||||||
items: [
|
items: [
|
||||||
menu.input({
|
menu.input({
|
||||||
initialValue: view.name$.value,
|
initialValue: view.name$.value,
|
||||||
|
placeholder: 'View name',
|
||||||
onChange: text => {
|
onChange: text => {
|
||||||
view.nameSet(text);
|
view.nameSet(text);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user