I am using angular4 with Redux and angular material to design my web page. I am trying to set the md-select panel to be open. example scenario: click button dispatches an action to open the select panel opens to dispaly all options.
I am using redux actions to manipulate my components state. So basically I need to fire an action to set the select to open.
Any suggestions?
Using the Material2 example as starting point for this answer. Here is how you can do that:
Plunker link here: PLUNKER DEMO
Check Link : https://www.npmjs.com/package/angular2-select#methods
this may help you.
This example shows you how to subscribe to state so that the drop down will be whatever the current state is. So change
initialState
to be true if you want it initially open.There is a button that dispatches the toggle state action to open the drop down.
This can be modified to toggle or create separate open/close buttons or whatever you need.
state.ts
my-component.ts