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

Controlling the accordion programmatically in JavaScript #29

Open
enkemari opened this issue Apr 3, 2017 · 6 comments
Open

Controlling the accordion programmatically in JavaScript #29

enkemari opened this issue Apr 3, 2017 · 6 comments

Comments

@enkemari
Copy link

enkemari commented Apr 3, 2017

Hi,

I'd like to control the accordion programmatically with something like:

HTML:

JS:
vm.angAccordion.isOpenned = false;

Is there something I'm missing that allows for this already?

@uxxman
Copy link
Owner

uxxman commented Apr 3, 2017

Hi,

Currently there is no way to open/close collapsible items grammatically, you can only specify which collapsible items are open/closed at the time the directive is rendering.

@enkemari
Copy link
Author

enkemari commented Apr 4, 2017

Ok, thanks. It would be cool to do that, though.

For example, we're using the accordion in a search - we put all our search filters in the accordion and then when the user clicks on the Search button (also in the accordion), we'd like the accordion to close and the table displaying the search results to take up most of the screen. The user can then manually open the accordion again to do a new search.

@uxxman
Copy link
Owner

uxxman commented Apr 5, 2017

you can try for re-render of the directive, but I m not sure I haven't seen angularjs in ages. A good UI design would be to show the search filter accordion on left side and the results table on the right so at each point, user can see what filters are active for the results table

@ferchoman09
Copy link

I need open/close from Javascript controller too. +1

@tno2007
Copy link

tno2007 commented Feb 5, 2018

Open/Close from Javascript. +1

1 similar comment
@JayPatel1992
Copy link

Open/Close from Javascript. +1

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

5 participants