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

feat(dropdown): add option to let event propagate on toggle #2964

Merged
merged 2 commits into from
Nov 3, 2017
Merged

feat(dropdown): add option to let event propagate on toggle #2964

merged 2 commits into from
Nov 3, 2017

Conversation

H--o-l
Copy link
Contributor

@H--o-l H--o-l commented Nov 2, 2017

Issue #1217 was fixed but re-introduce
recently in development branch (commit 04cab1e).

Let's add an option to authorize propagation of click event on toggle
for users that need it.

Issue #1217 was fixed but re-introduce
recently in development branch (commit 04cab1e).

Let's add an option to authorize propagation of click event on toggle
for users that need it.
@valorkin
Copy link
Member

valorkin commented Nov 2, 2017

@H--o-l question is: if add (click)="return false;" should it do the same?

@valorkin
Copy link
Member

valorkin commented Nov 2, 2017

@H--o-l as far as I remember I was fighting with document click closing just opened dropdown :)

@H--o-l
Copy link
Contributor Author

H--o-l commented Nov 2, 2017

@valorkin ok, not sure what you mean but I'm glad to do some tests if you have ideas.

For now I tried:
<button dropdownToggle (click)="false"> which doesn't work and <button dropdownToggle (click)="return false"> which doesn't compile.

Before submitting the PR I also tried to remove the event.stopPropagation() in dropdown-toggle directive and it was ok for my app.

Do you have other suggestions ? Or did I missed something ?

@valorkin
Copy link
Member

valorkin commented Nov 3, 2017

what if completely remove event.stopPropagation() from drop down toggle
but (click)="$event.stopPropagation()" should work in the same way
need to try this
cc #2800

@H--o-l
Copy link
Contributor Author

H--o-l commented Nov 3, 2017

@valorkin just to add water under the bridge, you did say, in this discussion #1217, that twitter bootstrap stop the click event.
I don't know twitter bootstrap myself but it's seems a legitimate reason to put event.stopPropagation() where you did, but we need the option to desactivate it :-)

@valorkin
Copy link
Member

valorkin commented Nov 3, 2017

@valorkin
Copy link
Member

valorkin commented Nov 3, 2017

yep they use it a lot

@codecov
Copy link

codecov bot commented Nov 3, 2017

Codecov Report

Merging #2964 into development will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #2964      +/-   ##
===============================================
- Coverage        65.78%   65.77%   -0.01%     
===============================================
  Files              207      207              
  Lines             5608     5610       +2     
  Branches           984      985       +1     
===============================================
+ Hits              3689     3690       +1     
  Misses            1656     1656              
- Partials           263      264       +1
Impacted Files Coverage Δ
src/dropdown/bs-dropdown-toggle.directive.ts 82.75% <66.66%> (-2.43%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d485387...62fd267. Read the comment docs.

@valorkin valorkin merged commit 62fd267 into valor-software:development Nov 3, 2017
@valorkin
Copy link
Member

valorkin commented Nov 3, 2017

@H--o-l thanks again :)
we will see where it will take us

@H--o-l
Copy link
Contributor Author

H--o-l commented Nov 3, 2017

@valorkin thanks to you !

@valorkin
Copy link
Member

valorkin commented Nov 3, 2017

My hope to release it today

@H--o-l H--o-l deleted the feat/dropdown-suppress-click-option branch November 6, 2017 09:38
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.

3 participants