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

Tabs Module and Pagination don't like each other

Open DouglasWebster opened this issue 9 years ago • 6 comments

I have been working on a project where the Pagination, Alerts and Tabs modules are all on the same page. With the changeDetectionStrategy.OnPush form the tabs module is active on the page the pagination changes do not sync correctly and the automatic timed dismissing of an alert doesn't occur until the time has elapsed and a mouse click occurs.

I have put together a small page which demonstrates the problem at https://douglaswebster.github.io/ng2-bootstrap-demo/.

If the changeDetectionStrategy.OnPush is not used then the pagination and alerts work but activating the inhibited tag raises an exception.

I have one way round this but would appreciate any advice on how to circumvent the problem safely.

DouglasWebster avatar Jan 05 '17 20:01 DouglasWebster

Demo is awesome! But for me it is all working? What I should do to reproduce issue?

valorkin avatar Jan 06 '17 13:01 valorkin

If I start the demo and then click the Add more button the timed alert appears. However, it does not clear after the 5 seconds but waits until a mouse click occurs.
Also, on the default pagination set click the Last button and all four paginations got to 7 but if you then click page 6 in the section bracketed Previous and Next that section moves to to 6 but leaves the others on 7. Then continued selecting of numbers does eventually bring them in sync again. The Limit and Max visible buttons set behaves strangely as well as selecting Last on one doesn't move the other but further clicks seems to bring them back into sync. The overall sense is that things are one click behind where they should be.
For info, the demo code is at https://github.com/DouglasWebster/ng2-bootstrap-demo.git. If you comment out lines 2 and 5 in app.component.ts which refer to changeDetectionStrategy and rebuild then the above behavior disappears but then problems occur when Enable/Disable third tab is clicked.

Hope the above makes sense to you.

DouglasWebster avatar Jan 06 '17 14:01 DouglasWebster

Sorry about marking it as closed - pressed the wrong button!

DouglasWebster avatar Jan 06 '17 14:01 DouglasWebster

Awesome, I will play with it

valorkin avatar Jan 06 '17 14:01 valorkin

@DouglasWebster most probably I will have to put here and there mark for check things

valorkin avatar Jan 06 '17 15:01 valorkin

Fixed in 2.0.0-beta.8 https://stackblitz.com/edit/ngx-bootstrap-1dkgfn

IlyaSurmay avatar Nov 09 '17 12:11 IlyaSurmay