0

I am trying to make a dropdown of checkboxes with angular without using third party library.

    <div class="label-wrapper">
        <label>
            Filter By:
        </label>
    </div>

    <div class="dropdown-wrapper">
        <input type="text" placeholder="filterCtrl.myInput" ng-focus="inputFocus(true)" ng-blur="inputFocus(false)">
        <ul 
          class="multi-checkbox-dropdown" 
          ng-focus="dropdownFocus(true)" 
          ng-blur="dropdownFocus(false)" 
          ng-if="filterCtrl.dropDownInputFocus">

         <li ng-repeat="value in filterCtrl.filterList">
          <input type="checkbox" value="value.name" ng-model="filterCtrl.filterValue2[value.name]"/>
          {{value.name}}
         </li>
        </ul>
    </div>

Here is what it looks like when the dropdown is clicked

enter image description here

Here is what it looks like when the dropdown is not clicked

enter image description here

Here is what I would like it to look like using css

enter image description here

I am confused on

  1. How to make a wrapper container that wraps around the ul such that it overlays on top of the element that it overflows?
  2. How to make the Filter By: label not push down by the ul ?

Any help would be appreciated. Thanks

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.