Skip to content
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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

AntonIV8
Copy link
Contributor

No description provided.

@AntonIV8 AntonIV8 linked an issue Dec 10, 2020 that may be closed by this pull request
/**
Used for check confirm delete rows function and get result.

@method checkConfirmDeleteRows
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@method checkConfirmDeleteRows
@private
@method checkConfirmDeleteRows

/**
Used for check before delete record function and get result.

@method checkBeforeDeleteRecord
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@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;
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И это.

Comment on lines +49 to +51
let funcTest = function() {
return true;
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не хватает вариантов когда эти функции возвращают ложные значения и промисы.

@pepelyaeva
Copy link
Contributor

Исправить для 3 версии

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Проблемы confirmDeleteRow[s] и beforeDeleteRecord
4 participants