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

Cancel opening detail panel on click #378

Closed
MrMoronIV opened this issue May 21, 2019 · 4 comments · Fixed by #852
Closed

Cancel opening detail panel on click #378

MrMoronIV opened this issue May 21, 2019 · 4 comments · Fixed by #852
Labels

Comments

@MrMoronIV
Copy link

Following this example: http://6pac.github.io/SlickGrid/examples/example16-row-detail.html

Is there a way to cancel the open action after the row is clicked? Or can I toggle if the plugin is active or not on the fly? I want to have one panel open as a maximum and force the user to click [Save] or [Cancel] in the detail panel before a new one can be opened.

@ghiscoding
Copy link
Collaborator

Again all the documentation is directly inside the Row Detail Plugin, I assume you can do what you want with the few events available and then stop the event from bubbling up

@MrMoronIV
Copy link
Author

As far as I can tell this isn't possible since returning false inside these events only avoids the rest of the code below it to be ran, panels are still opening no matter what I do inside these evemt listeners, hence this question :)

@SatanEnglish
Copy link
Contributor

You could use the expandableOverride for stopping others opening
e.g. You have a bool that you update to say if one is open and update the override to hide all the others while it's open.

Not the best way to do it but this is just one way I can think of doing it.

As for stopping the collapse happening removing the detailView-toggle from the item while it's being edited should stop it being able to be collapsed. (Not sure what other issues this would cause tho)

Hope this at least gives you somewhere to start looking

@ghiscoding
Copy link
Collaborator

better late than never, now available in latest version 5.1.0 also note that a lot changed since this issue was created, we dropped jQuery/jQueryUI and we migrated to TypeScript

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

Successfully merging a pull request may close this issue.

3 participants