-
Notifications
You must be signed in to change notification settings - Fork 27
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
Move confirm delete row and before delete row check to util #1235
base: develop
Are you sure you want to change the base?
Conversation
/** | ||
Used for check confirm delete rows function and get result. | ||
|
||
@method checkConfirmDeleteRows |
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.
@method checkConfirmDeleteRows | |
@private | |
@method checkConfirmDeleteRows |
/** | ||
Used for check before delete record function and get result. | ||
|
||
@method checkBeforeDeleteRecord |
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.
@method checkBeforeDeleteRecord | |
@private | |
@method checkBeforeDeleteRecord |
Ember.assert('Error: beforeDeleteRecord must be a function', typeof beforeDeleteRecordFunction === 'function'); | ||
let promis = beforeDeleteRecordFunction(record, data); | ||
possiblePromise = (promis && (promis instanceof Ember.RSVP.Promise)) ? promis : possiblePromise; | ||
possiblePromise = (data.cancel) ? null : possiblePromise; |
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.
Проверку data.cancel
видимо придётся оставить за функцией, потому что это нужно проверять только после резолва промиса.
@@ -80,7 +80,6 @@ | |||
filterByAllWords=filterByAllWords | |||
configurateRow=this.attrs.configurateRow | |||
configurateSelectedRows=this.attrs.configurateSelectedRows | |||
confirmDeleteRow=confirmDeleteRow |
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.
Пока только устарело, нужно оставить.
@@ -120,7 +120,6 @@ | |||
filterByAllWords=filterByAllWords | |||
configurateRow=this.attrs.configurateRow | |||
configurateSelectedRows=this.attrs.configurateSelectedRows | |||
confirmDeleteRow=confirmDeleteRow |
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.
И это.
let funcTest = function() { | ||
return true; | ||
}; |
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.
Не хватает вариантов когда эти функции возвращают ложные значения и промисы.
Исправить для 3 версии |
No description provided.