Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Switching to Tabs from nav pills
Message
 
 
À
Tous
Information générale
Forum:
Javascript
Catégorie:
Autre
Titre:
Switching to Tabs from nav pills
Divers
Thread ID:
01616617
Message ID:
01616617
Vues:
37
Hi everybody,

In few forms I switched from bootstrap nav pills and partial view to the following markup:
 <div class="col-lg-3 col-md-3 panel-container">
                        <tabset vertical="true" type="pills">
                            <tab heading="@Labels.general" select="selectView('general')"  >

                            </tab>

                            <tab heading="@Labels.passes" select="selectView('guestPasses')">

                            </tab>

                            <tab heading="@Labels.history" select="selectView('guestActivity')">

                            </tab>
                            
                            <tab heading="@Labels.userDefined 1"
                                 select="selectView('userDefined1')" >
                            </tab>                     
                            
                            <tab heading="@Labels.userDefined 2"
                                 select="selectView('userDefined2')" >
                            </tab>
                        </tabset>
                    </div>

                    <div class="col-lg-9 col-md-9 panel-container">
                        <div data-ui-view data-autoscroll="false"></div>
                        <div data-ui-view="guestPasses" data-autoscroll="false"></div>
                    </div>
And I've noticed the behavior change I am wondering if I should live with or can do something about - if I type something that makes control invalid (say, in the text allowing 10 characters type 20), I can see the invalid message when I am on this tab. When I switch to another tab and then go back, that control goes to the original empty state.

The code to select view is simple:
$scope.selectView = function (viewName) {
                if ($scope.isNew) {
                    $state.go('new.' + viewName);
                }
                else {
                    $state.go('edit.' + viewName);
                }
            };
and all the ui-views are defined at the top.

I am wondering if there is a way to preserve that bad input while switching between tabs or that behavior is expected?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform