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

Allow beforeDelete function to access deletable row on remove #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mahmed0715
Copy link

Hi, I was working on an electron app, when I try to remove i needed a hack and added value function to access the row and delete from electron db manually,
You know electron doesnt support http call, so I cant use remote mode, for local mode there is no such method implemented to access the deletable row before actual delete from data table.

I hope You understand and merge the pull request.
Thanks
NB: I adjusted the demo and you can see in action about the change..

@galbini
Copy link

galbini commented Jun 4, 2018

Hi,

Thanks for your proposal, i try to study it quickly.
Just two remarks,
1/ the term value is to generic may be beforeDelete is more adapted
2/ you used allResult rather displayResult and all result represant all the data and displayResult only the displaying data. If you have several page the index i is not good for other page than the first.

Best regards,
Guillaume

@mahmed0715
Copy link
Author

mahmed0715 commented Jun 4, 2018 via email

@mahmed0715 mahmed0715 changed the title Allow value function to access deletable row on remove Allow beforeDelete function to access deletable row on remove Jun 7, 2018
@mahmed0715
Copy link
Author

Please merge

@mahmed0715
Copy link
Author

Changes done as requested..Please merge

@galbini
Copy link

galbini commented Jun 8, 2018

Hi,

Thanks you for your update, i think your feature very interesting but for me some improvements are needed.

1/ what's happen when beforeDelete not work ?
beforeDelete must to be return a boolean (true => ok delete can be done, false => delete cannot be done)
in the case of false, we need to alert the user.

2/ beforeDelete can also be call when we execute a remote delete.

what do you think about it ?

Best regards,
Guillaume

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

Successfully merging this pull request may close these issues.

None yet

2 participants