Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why pressing Enter does not trigger the search?
Message
De
07/04/2016 04:19:35
 
 
Information générale
Forum:
CSS
Catégorie:
Dépannage
Divers
Thread ID:
01634461
Message ID:
01634476
Vues:
24
>Hi everybody,
>
>I have a modal page with the following markup:
>
>
><div class="modal-header">
>    <button type="button" class="close" data-dismiss="modal" ng-click="$dismiss()" aria-hidden="true">×</button>
>    <h4 class="modal-title">{{pickerTitle}}</h4>
></div>
><table>
>    <tr class="modal-body">
>        <td>
>            <div id="SimpleSearch" class="row">
>                <div class="form-group row col-lg-12">
>                    <label class="sr-only col-lg-3">Label!</label>
>                    <div class="input-group" style="margin-top: 20px;">
>                        <input type="text" class="controls form-control" ng-model="simpleSearch" placeholder="@Labels.search" />
>                        <span class="input-group-btn">
>                            <button class="btn btn-default"
>                                    ng-click="doSimpleSearch(simpleSearch)">
>                                @Labels.search
>                                </button>
>                            </span>
>                        </div>
>                    </div>
>            </div>
>            <table id="searchTable" ng-show="contactList" class="table table-bordered table-hover table-list"
>                   style="width: 90%; margin: 0 auto">
>                <thead search-table-header table="table" search="searchContacts(table)">
>
>                    @*<div class="col-lg-12"><a>advanced search</a></div>
>                        <div class="col-lg-6"><label>Contact type: {{type}}</label></div>*@
>                </thead>
>                <tbody>
>                    <tr ng-repeat="contact in contactList" ng-click="$close(contact)">
>                        <td>{{contact.firstName}}</td>
>                        <td>{{contact.lastName}}</td>
>                        <td>{{contact.phoneNumber}}</td>
>                        <td>{{contact.emailAddress}}</td>
>                        <td>{{contact.birthDate | date:'M/d/yyyy'}}</td>
>                        <td>{{contact.age}}</td>
>                    </tr>
>                </tbody>
>            </table>
>        </td>
>    </tr>
>    <tr>
>        <td>
>            <div class="modal-footer">
>                <div class="pull-right" ng-show="table.pageCount > 1">
>                    <uib-pagination total-items="table.totalCount"
>                                    ng-model="table.pageNumber"
>                                    items-per-page="table.pageSize"
>                                    max-size="5"
>                                    rotate="false"
>                                    ng-change="selectPage()">
>                    </uib-pagination>
>                </div>
>            </div>
>        </td>
>    </tr>
></table>
>
>When I type something in the search textbox and press Enter, nothing happens. I have to manually click on the Search button.
>
>The exact same markup (except for the table) works fine in all our index pages - as soon as we press enter after entering values in the input textbox, the Search fires.
>
>Why it doesn't work in the Modal form?
>
>Thanks in advance.

I think you need to wrap in a form with ng-submit to get that behaviour ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform