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

dropdown - use additional on-click event #26

Open
rdewolff opened this issue Aug 5, 2014 · 4 comments
Open

dropdown - use additional on-click event #26

rdewolff opened this issue Aug 5, 2014 · 4 comments

Comments

@rdewolff
Copy link
Contributor

rdewolff commented Aug 5, 2014

Hi all

Is it possible to use other on-click event on top of the existing on-click="toggle()" call?

Cheers

@minicuper
Copy link

You can for example: on-click="toggle(), yetAnotherAction()"
or
on-click="toggle()" on-click="yetAnotherAction()"

@rdewolff
Copy link
Contributor Author

rdewolff commented Aug 5, 2014

How can I override the default behavior of the on-click declared in the component ?

When doing this in my templates :

<dropdown class='col-sm-2' on-click='toggle(), changeOrder()' value='{{_page.orderChoice}}' options='{{_page.order}}' id='filter'></dropdown>

It doesn't work.

@rdewolff
Copy link
Contributor Author

Have you tested this zag2art?

@minicuper
Copy link

To change the function a would make something like this -

Dropdown = require('d-bootstrap/dropdown')
Dropdown.prototype.toggle = function(){
  // ....
}
app.component(Dropdown);

instead of use

app.use(require(''d-bootstrap'));

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

No branches or pull requests

2 participants