focus promoted/owned attributes input after activating the ribbon tab, closes #2606

This commit is contained in:
zadam
2022-02-01 20:24:58 +01:00
parent be44431fde
commit 46eaa63625
6 changed files with 31 additions and 11 deletions

View File

@@ -310,6 +310,10 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {
$attr.attr("data-attribute-id", result.attributeId);
}
focus() {
this.$widget.find(".promoted-attribute-input:first").focus();
}
entitiesReloadedEvent({loadResults}) {
if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {
this.refresh();