[DE] Bookmarks: select existing bookmark in the list when typing new name

This commit is contained in:
Julia Radzhabova 2018-06-19 16:08:20 +03:00
parent 298cc601c1
commit c07b2e1db0

View file

@ -287,7 +287,10 @@ define([
onNameChanging: function (input, value) {
var exist = this.props.asc_HaveBookmark(value);
this.bookmarksList.deselectAll();
if (exist)
this.bookmarksList.selectRecord(this.bookmarksList.store.findWhere({value: value}));
else
this.bookmarksList.deselectAll();
this.btnAdd.setDisabled(!this.props.asc_CheckNewBookmarkName(value) && !exist);
this.btnGoto.setDisabled(!exist);
this.btnDelete.setDisabled(!exist);