toniantunovi / ion-bottom-drawer

Bottom drawer component for Ionic 4
63 stars 16 forks source link

Can you add click to open and click to close support? #3

Closed kzsense closed 6 years ago

kzsense commented 6 years ago

Hey Toni, can you add click to open and click to lose support please? Or can you give me the instructions how to do it?

toniantunovi commented 6 years ago

Hi,

I'm not sure what you mean by that. You can toggle the drawer by changing the value of hidden input:

hidden: boolean - When set to true it will close the drawer completely. When set to false it will open it to docked position.

If this is not what you needed, can you please explain a bit better what do you mean by click to open and click to close.

kzsense commented 6 years ago

Sorry to make u confused. The hidden input takes care of "show" or "hide" the drawer, i get it. What I mean by "click" support is that: for now you can only "drag" the drawer up, I would like a "click/tap" to slide up the drawer. It would be better if you have both "click" and "drag" both.

torsorensen commented 6 years ago

Kzsense, why don't you just make the click listener of a button or parts of the drawer content toggle the hidden value true/false?

kzsense commented 6 years ago

I found it's easier if I have the screenshots to help me.. what I mean: 1-1 then I "click", not "drag" the drawer, the drawer turns to 1-2 .

what the hidden value do: 1-3 1-1 so toggle hidden value doesn't help.

hope this makes sense

toniantunovi commented 6 years ago

I think I understand what you mean. It makes sense. I'll publish the update next week.

toniantunovi commented 6 years ago

Hi, you can check it now. If that's what you needed. You can now basically control the state input to change between Closed, Docked and Opened.

kzsense commented 6 years ago

Yes it is working perfectly, thanks Toni, sorry for replying late, was working on other functionality lol

bhandaribhumin commented 5 years ago

@kzsense can you share me some example or code [.scss/.ts] because I try to achieve the same functionality. if possible thanks, brother.