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

Add EditableGroupDirective to public API #8

Open
jordanmaslyn opened this issue Mar 17, 2021 · 3 comments
Open

Add EditableGroupDirective to public API #8

jordanmaslyn opened this issue Mar 17, 2021 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers PR is welcome

Comments

@jordanmaslyn
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

There is no means (that I can tell) to track an outside click to disable the editing for a group, and doing so should be relatively straight forward if the directive was exposed for use in another custom directive.

Expected behavior

I would love to be able to somehow change modes for a group when an outside click is detected.

I can think of a couple of ways to accomplish this. One is just writing my own directive to handle it, but because this lib does not export the EditableGroupDirective, I have no means to inject it into my own directive to make changes. Could the change be made to export the directive?

Minimal reproduction of the problem with instructions

Create a table where the <tr> is both editableGroup and editableGroupEdit. Clicking on the <tr> turns on editing for the row but if I want to capture a click anywhere else in the document, I have no way of doing that.

What is the motivation / use case for changing the behavior?

Turning off edit mode in one fell swoop without a dedicated button.

@RadouaneRoufid
Copy link

+1

@NetanelBasal
Copy link
Member

You're welcome to submit a PR.

@NetanelBasal NetanelBasal added enhancement New feature or request good first issue Good for newcomers PR is welcome labels Apr 28, 2021
@geromegrignon
Copy link
Collaborator

Hello @jordanmaslyn,

I'm really sorry : by the time you opened this issue i prepared an answer to let you know i would be busy for the next two months and wouldn't be able to provide a PR myself. I realised today i didn't submitted my answer :(
As these two months have passed, i'll be able to work on it next week.

Rather than exporting the directive, i'll make some expriment to use the same behavior added into the editable component to detect clicks outside of the element. It should make it more simple to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers PR is welcome
Projects
None yet
Development

No branches or pull requests

4 participants