DEVHIDE
  • Home (current)
  • About
  • Contact
  • Cookie
  • Home (current)
  • About
  • Contact
  • Cookie
  • Disclaimer
  • Privacy
  • TOS
Login Or Sign up

md-autocomplete with bootstrap's class="modal-content" not working

419 Views Asked by Vishal Arthamwar At 29 August 2017 at 09:17 2025-12-08T09:07:08.254619

My Main Modal Component is:-

<div class="modal-content">
    <div class="modal-header"> </div>
    <div class="modal-body">
        <display-states-component rolesdata="$ctrl.modaldata.displayStatesRoles"></display-states-component>
    </div>
</div>

DisplayStatesComponent is(Angular 1.5 Component architecture)

<form ng-submit="$event.preventDefault()">
    <md-autocomplete md-no-cache="true" md-selected-item="$ctrl.displayPerRoles[$index].roleName" md-search-text="$ctrl.searchText" md-items="item in $ctrl.querySearch($ctrl.searchText)" md-item-text="item.value" md-min-length="0" placeholder="Select Role?">
        <md-item-template>
            <span md-highlight-text="$ctrl.searchText" md-highlight-flags="^i">{{item.value}}</span>{{item.value}}
        </md-item-template>
        <md-not-found>
            No role matching "{{$ctrl.searchText}}" were found.
            <a ng-click="$ctrl.manageStates('ADD')">Create a new one!</a>
        </md-not-found>
    </md-autocomplete>
</form>

And MY Corresponding Display States Controller is:-

 $ctrl.states = loadAll();

 $ctrl.querySearch = function(query) {
     var results = query ? $ctrl.states.filter(createFilterFor(query)) : $ctrl.states,
         deferred;
     console.log("With my Testings in else--->", results);
     return results;
 }

 /**
  * Build `states` list of key/value pairs
  */
 function loadAll() {
     var allStates = 'Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware,\
              Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana,\
              Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana,\
              Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina,\
              North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina,\
              South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia,\
              Wisconsin, Wyoming';

     return allStates.split(/, +/g).map(function(state) {
         return {
             value: state.toLowerCase(),
             display: state
         };
     });
 }

My Filter Functions are

function createFilterFor(query) {
    var lowercaseQuery = angular.lowercase(query);

    return function filterFn(state) {
        return (state.value.indexOf(lowercaseQuery) === 0);
    }
};

I am using this code to search for states as the user types state name in autocomplete box. I am getting the results on console but that is not showing item text (I think getting hidden behind bootsrap's modal).

Thanks in advance.

angularjs bootstrap-modal md-autocomplete
Original Q&A
0

There are 0 best solutions below

Related Questions in ANGULARJS

  • Angular Show All When No Filter Is Supplied
  • Using pagination on a table in AngularJS
  • State with different subviews
  • Getting and passing MVC Model data to AngularJS controller
  • Implementing prerender.io middleware in sails.js
  • Token based authorization in nodejs/ExpressJs and Angular(Single Page Application)
  • AngularJS, Google App Engine and URLrewrite
  • send data from table to another page into forms
  • How to write tests for classes with inheritance
  • angularJS sending OPTIONS instead of POST
  • Receiving POST from external application in AngularJS
  • Metaprogramming AngularJS Filters
  • Reload List after Closing Modal
  • Why is my angularjs site not completely crawlable?
  • Why is separation of JavaScript and HTML a good practice?

Related Questions in BOOTSTRAP-MODAL

  • Bootstrap 3 Modal not working
  • Insert bs modal on page just by using JS
  • JQuery on click event on Href
  • How do I make a reCAPTCHA display properly on a Bootstrap modal on mobile?
  • Add modal window after submitting form
  • Bootstrap modal popup close on button (type=submit) post back asp.net c#
  • Dynamic Modal Bootstrap
  • Datepicker in Angular ui modal not opening
  • Bootstrap Modal Pop up is not working in asp .net c#
  • Bootstrap Modal Events Not Firing with Joint.js
  • How do I steal the click event from an element?
  • How to produce a modal on form submit instead of a page redirect
  • Angular UI modal not passing ng-model as expected
  • Can't validate a form in Bootstrap Modal using JavaScript
  • Angular ng-repeat filter passing wrong index

Related Questions in MD-AUTOCOMPLETE

  • Angular material design md-autocomplete with md-max-length and pattern
  • md-autocomplete - remove selected items in suggestion
  • md-chips and md-autocomplete input field
  • md-autocomplete dropdown size not stable
  • md-autocomplete with bootstrap's class="modal-content" not working
  • create md-autocomplete in angular-material2 with minimal 3 characters then start search the autocomplete
  • How do I filter on md-menu-container-class?
  • Validating <md-autocomplete> in Angular
  • Display only one attribute of arrayed objects in md-autocomplete :md-options
  • <md-autocomplete> is not initializing.
  • material angular chips with autocomplete
  • md-autocomplete when selecting a dropdown item object it says [Object Object]
  • md-autocomplete searching with query issue
  • How to change options when searching in md-autocomplete
  • How to sort list start with first and then contains string search in md-autocomplete AngularJS

Trending Questions

  • UIImageView Frame Doesn't Reflect Constraints
  • Is it possible to use adb commands to click on a view by finding its ID?
  • How to create a new web character symbol recognizable by html/javascript?
  • Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
  • Heap Gives Page Fault
  • Connect ffmpeg to Visual Studio 2008
  • Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
  • How to avoid default initialization of objects in std::vector?
  • second argument of the command line arguments in a format other than char** argv or char* argv[]
  • How to improve efficiency of algorithm which generates next lexicographic permutation?
  • Navigating to the another actvity app getting crash in android
  • How to read the particular message format in android and store in sqlite database?
  • Resetting inventory status after order is cancelled
  • Efficiently compute powers of X in SSE/AVX
  • Insert into an external database using ajax and php : POST 500 (Internal Server Error)

Popular # Hahtags

javascript python java c# php android html jquery c++ css ios sql mysql r reactjs

Popular Questions

  • How do I undo the most recent local commits in Git?
  • How can I remove a specific item from an array in JavaScript?
  • How do I delete a Git branch locally and remotely?
  • Find all files containing a specific text (string) on Linux?
  • How do I revert a Git repository to a previous commit?
  • How do I create an HTML button that acts like a link?
  • How do I check out a remote Git branch?
  • How do I force "git pull" to overwrite local files?
  • How do I list all files of a directory?
  • How to check whether a string contains a substring in JavaScript?
  • How do I redirect to another webpage?
  • How can I iterate over rows in a Pandas DataFrame?
  • How do I convert a String to an int in Java?
  • Does Python have a string 'contains' substring method?
  • How do I check if a string contains a specific word?
.

Copyright © 2021 Jogjafile Inc.

  • Disclaimer
  • Privacy
  • TOS
  • Homegardensmart
  • Math
  • Aftereffectstemplates