Dropdown when selected goes to first page all by itself - Forum

Forum Navigation
You need to log in to create posts and topics.

Dropdown when selected goes to first page all by itself

My dropdown is going to my projects first page and I can't stop it.

Start a new project, make it two pages.  On the first page drop a pager component.  Now go to your 2nd page and add a dropdown to the page and give it some items..  No need for a pager component on the 2nd page, you will see.

Now run the app from the start and go to your 2nd page with the drop down.  Select any item from your drop down and the app will go to the first page all by itself..

How can I prevent this from happening?

@darbdenral, it seems there is an incompatibility between BootStrap DropDown and AngularJS pagination,
I will try to fix it in the next release.
Meanwhile just insert this script inside the Page > Code tab where you are placing the DropDown:

BeginJS
   $("ul a").attr("href", "#!/"+$App.NAB.PageID);
EndJS

Let me know if it works for you.
Regards.

That did it..  Worked perfect!

thanks!

Actually, it might have created another problem..

Add a second dropdown to the page, add some items and then test..

The selected value does not display anymore in the dropdown, however the variable is set correctly.

update: i think it shows the same behavior without adding another dropdown.

 

Not sure if I understand you. I can't reproduce the problem.
Please check the attached app. I think it works fine.

Uploaded files:
  • You need to login to have access to uploads.

Yes, I tested it and your project does the same thing.  I guess the index of the selected item resets to zero after selecting the item.

See my short video here.

I guess I can just put the variable assigned to the dropdown in the caption property too.

thanks!

I think that's the way a BootStrap DropDown is supposed to work:
https://www.w3schools.com/bootstrap/bootstrap_dropdowns.asp

I guess I can just put the variable assigned to the dropdown in the caption property too.
thanks!

You are welcome!

This bug has been fixed in current version 19.9.16

Darbdenral has reacted to this post.
Darbdenral

Yes, it now works properly.  Bug has been squashed!

thanks!