React Native: TabBarIOS, rerender tabs on click - javascript

In my app i have TabBarIOS with 3 different tabs. When you change something or for example scroll page in one tab, then you go to another tab and when you come back, the tab's content is not rerendering. it stays at same place (scrolled).
is there anyway to rerender tab's content (component) everytime you click on tabs?

I found the solution in this article :
http://richardkho.com/persisting-tabbars-in-react-native/
Whenever you click on a tab, it renders a navigationios.
So when user is clicking on each tab, i should check if the tab is already selected or not. if it's already the selected tab, i should do navigate.poptotop ( for the navigation ios that is being called ).
if not, i just call the navigation

Related

react-native ios modals order

In react-native app I have a component which show some data. In this component there is modal, that shows on button press with some detailed data. And in this modal I have a button to show another modal with some specific data.
Something like this:
MainComponent->ModalWithSomeColorSettings->ModalWithColorPickerForCurrentElement.
In Android version threre is right order by show on modal by overlap another by default. And if I open one modal, that shows. If in that modal press button to show second modal, that modal shows and overlap previos. If I close last, there is still first one modal on the screen.
But in ios version if I open first modal, then open another, second modal did not show itself. Then if I close first modal, I can see second modal on screen. It's look like order multiple modals in android is different to ios order. First overlap second, instead second overlap first.
Did anyone know is there possible or not to change modals order in ios from react native? Or I need create component to show some specific data instead do it in modals? It's more helpful to stay with modals with my case, because in main component and first modals I have some fetch data from server and don't want to download this data every time when rollback to main component.

trying to open the specific tab for a popup

I have a page link where i had to click and that passes the value of the link as:
link.html?action=paid#mypayments-3
and the link.html has tabs as: they are jquery UI tabs
Paid
Overpaid
Pending
its not going to that section, how can i force it to go to that tab, Am i missing anything

Bootstrap tabs - change tab when "back" button clicked

I'm implementing with bootstrap3 tabs that are similar to the google+ tabs:
https://plus.google.com/109537483127696013335
Similarly to google+, I also change the URL using history.pushState() every time the user click a new tab.
The problem:
Let's say you viewed these 3 tabs:
https://plus.google.com/109537483127696013335/posts
https://plus.google.com/109537483127696013335/about
https://plus.google.com/109537483127696013335/photos
you have 3 items in your browser's history, if you click the back button you'll go back to /about and then /posts but the content of the page will stay the same (/photos) instead of changing back to the correct tab.
This problem exists in google+, I want a better behaviour of the back button for a better UX, how can I fix it?

Tabbed menu in CSS and Javascript - tab sets to active after refreshing page

I have tabbed menu written mainly in HTML and CSS. There are 5 tabs, the first one is set to active when we first load the page. I had to add little JS script, because that active tab wouldn't change its look to "not-active" when we clicked on another tab (so we had two tabs with "active" look). Everything works fine, but if we click on, let's say, 3rd tab and then refresh website, the first tab changes its look from "not-active" to "active", so there are two tabs with "active" look. Only the styling is wrong, content in the tabs views the right content... So if we click on another tab and refresh the page, we have two tabs with "active" look, but the website still views the content from the right tab. I don't want the first tab to set its look to "active" after refreshing page. I don't know JS and I don't know how to fix it.
Javascript:
jQuery(function($){
$(".tabmenu").children("div").click(function(){
$(".current").removeClass("current");
});
});
Here's the full code: http://jsfiddle.net/y5SzQ/1/
The simplest solution
$(".tabmenu").children("div").click(function () {
$(".current").removeClass("current");
})
.filter(location.hash).click();
(to test: change tab, right click Reload resule frame)
Demo: http://jsfiddle.net/y5SzQ/3/
What it does is just triggers click event similarly to what happens when user clicks with a mouse. If there is location.hash (say '#french-tab') and tab other then Polish has to be selected, then .filter(location.hash) will become for example .filter('#french-tab') and corresponding tab will be selected.

Tabs UI using Jquery

http://jqueryui.com/tabs/#manipulation the tabs manipulation does a click to add a tab. but i need a little tweak in there. after i click the add tab i.e., clicking add tab creates a tab2..but the screen doesn't takes the view to the second tab. It remains in the first tab but add the second tab(which is not active after click)
I need tab2 to be active after clicking the add button...this process continues for all the adding tabs.
I need a example or a way..coz it's a showstopper for my current project
There’s a link of the bottom of that page, “Want to learn more about the tabs widget? Check out the API documentation.”
And to get from there to http://api.jqueryui.com/tabs/#option-active should not be an impossible task for a developer, don’t you think …?

Categories