-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search #145
base: version2.0
Are you sure you want to change the base?
Search #145
Conversation
let found = this.DOM.notes.found, | ||
parent = found.parentNode; | ||
|
||
this.DOM.notes.found = parent.removeChild(found).cloneNode(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
innerHTML= '';
|
||
/** | ||
* Push note data to array where search will be done | ||
* @param {Object} data - data to push to the dataset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
описать объект
pushData( data ) { | ||
let existingDataIndex = this.dataset.length; | ||
|
||
this.dataset.forEach((item, index) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
написать комментарий
|
||
/** | ||
* Remove note data from array where search will be done | ||
* @param {Object} dataId - the id of data to remove from the dataset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это не объект
* @param {Object} dataId - the id of data to remove from the dataset | ||
*/ | ||
removeData( dataId ) { | ||
let existingDataIndex = this.dataset.length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вынести код в метод
@@ -19,28 +27,35 @@ | |||
.aside__scrollable | |||
.aside__scrollable-content(name="js-scrollable") | |||
|
|||
.aside__section-title Folders | |||
.aside__content-wrap(name="js-folders-container") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
проверить скролл
@@ -0,0 +1,13 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Svg optimize
//- | ||
//- div.notes-list__scroll | ||
//- | ||
ul.notes-list__content(name="js-found-notes-menu", tabindex="0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
скрывать поиск после очистки инпута
if (!noteData.title) { | ||
console.warn('Can not add Note to the Aside because it has no title', noteData); | ||
return; | ||
} | ||
|
||
if (searchData) { | ||
notesMenu = document.querySelector('[name="js-found-notes-menu"]'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
перенести в else if
let item = $.make('li'); | ||
|
||
if (highlight) { | ||
item.innerHTML = title.substring(0, highlight.start) + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace
Added a search field.