ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

AutoClose issue when opening dropdown using isOpen property

Open tanishkab opened this issue 3 years ago • 8 comments

Hi, I am kind of facing somewhat same issue, but here I am using isOpen property of dropdown in my ts file to open it, but I want the dropdown to autoClose and it is not happening.

<div class="btn-group" dropdown [insideClick]="true" #newdropdown="bs-dropdown" [autoClose]="true" container="body"> <div *dropdownMenu class="dropdown-menu" role="menu"> <multiEntity-table> </multiEntity-table> </div> </div>

I am using #newdropdown template ref to use isOpen property in my .ts file.

Originally posted by @tanishkab in https://github.com/valor-software/ngx-bootstrap/issues/5222#issuecomment-1020895728

tanishkab avatar Jan 25 '22 08:01 tanishkab

@tanishkab can you add more details regarding your issue, what version of library and angular do you use?

SvetlanaMuravlova avatar Jan 25 '22 10:01 SvetlanaMuravlova

Angular version : "~11.1.0" , ngx-bootstrap version: "^6.1.0"

tanishkab avatar Jan 25 '22 11:01 tanishkab

try to use the next version 6.2.0, and i can see the property autoclose is workable in such version https://valor-software.com/ngx-bootstrap/old/6.2.0/#/dropdowns

SvetlanaMuravlova avatar Jan 25 '22 11:01 SvetlanaMuravlova

The problem is still there, even after upgrading the library

tanishkab avatar Jan 25 '22 12:01 tanishkab

@tanishkab, so i think it will be helpful if you will create a small example to reproduce such bug, cause we can't reproduce it Also i can see it works in our documentation.

SvetlanaMuravlova avatar Jan 28 '22 14:01 SvetlanaMuravlova

Stackblitz representation: https://stackblitz.com/edit/angular-ngx-dropdown-msaj1m?file=src/app/app.component.ts

tanishkab avatar Jan 28 '22 16:01 tanishkab

@tanishkab thank you for your message, i can confirm your issue now

SvetlanaMuravlova avatar Feb 15 '22 12:02 SvetlanaMuravlova

I also have this problem(

moddi3 avatar Aug 08 '22 15:08 moddi3

I'm encountering the same issue, anyone has a workaround?

liuyankit avatar Feb 03 '23 15:02 liuyankit

nope, if you can add dropdownToggle then it works fine otherwise not

tanishkab avatar Feb 06 '23 12:02 tanishkab