Focus title input when adding new record
This commit is contained in:
parent
3153910151
commit
d00282b5df
|
@ -128,6 +128,7 @@
|
|||
};
|
||||
this.collection.add(record);
|
||||
this.openRecord(record);
|
||||
this.$.recordView.focusTitle();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
</style>
|
||||
<div class="header">
|
||||
<button on-click="{{ back }}"><</button>
|
||||
<input value="{{ record.name }}" placeholder="Enter Title..." />
|
||||
<input id="titleInput" value="{{ record.name }}" placeholder="Enter Title..." />
|
||||
</div>
|
||||
<template repeat="{{ field, i in record.fields }}">
|
||||
<div class="field">
|
||||
|
@ -111,6 +111,9 @@
|
|||
value: ""
|
||||
};
|
||||
this.record.fields.push(field);
|
||||
},
|
||||
focusTitle: function() {
|
||||
this.$.titleInput.focus();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue