UNPKG

carbon-components-angular

Version:
1,535 lines 58 kB
<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title>carbon-components-angular documentation</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="icon" type="image/x-icon" href="../images/favicon.ico">
	   <link rel="stylesheet" href="../styles/style.css">
        <link rel="stylesheet" href="../styles/dark.css">
    
	<style>
		footer.carbon {
			position: absolute;
			bottom: 0;
			width: 100%;
			z-index: 9999;
		}
		#root > div {
			/*
			 * Subtracting the height of the footer to prevent
			 * overlaying the footer ontop of content
			 */
			height: calc(100vh - 48px);
		}
	</style>
</head>
    <body>
          <script>
               // Blocking script to avoid flickering dark mode
               // Dark mode toggle button
               var useDark = window.matchMedia('(prefers-color-scheme: dark)');
               var darkModeState = useDark.matches;
               var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
               var $darkModeToggles = document.querySelectorAll('.dark-mode-switch');
               var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state');

               function checkToggle(check) {
                    for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
                         $darkModeToggleSwitchers[i].checked = check;
                    }
               }

               function toggleDarkMode(state) {
                    if (window.localStorage) {
                         localStorage.setItem('compodoc_darkmode-state', state);
                    }

                    checkToggle(state);

                    const hasClass = document.body.classList.contains('dark');

                    if (state) {
                         for (var i = 0; i < $darkModeToggles.length; i++) {
                              $darkModeToggles[i].classList.add('dark');
                         }
                         if (!hasClass) {
                              document.body.classList.add('dark');
                         }
                    } else {
                         for (var i = 0; i < $darkModeToggles.length; i++) {
                              $darkModeToggles[i].classList.remove('dark');
                         }
                         if (hasClass) {
                              document.body.classList.remove('dark');
                         }
                    }
               }

               useDark.addEventListener('change', function (evt) {
                    toggleDarkMode(evt.matches);
               });
               if (darkModeStateLocal) {
                    darkModeState = darkModeStateLocal === 'true';
               }
               toggleDarkMode(darkModeState);
          </script>

        <div class="navbar navbar-default navbar-fixed-top d-md-none p-0">
               <div class="d-flex">
                    <a href="../" class="navbar-brand">carbon-components-angular documentation</a>
                    <button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button>
               </div>
        </div>

        <div class="xs-menu menu" id="mobile-menu">
                <div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div>            <compodoc-menu></compodoc-menu>
        </div>

        <div class="container-fluid main">
           <div class="row main">
               <div class="d-none d-md-block menu">
                   <compodoc-menu mode="normal"></compodoc-menu>
               </div>
               <!-- START CONTENT -->
               <div class="content directive">
                   <div class="content-data">







<ol class="breadcrumb">
  <li class="breadcrumb-item">Directives</li>
  <li class="breadcrumb-item" >AbstractDropdownView</li>
</ol>

<ul class="nav nav-tabs" role="tablist">
        <li class="nav-item">
            <a href="#info" 
                class="nav-link"
                class="nav-link active"
                role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a>
        </li>
        <li class="nav-item">
            <a href="#source" 
                class="nav-link"
                
                role="tab" id="source-tab" data-bs-toggle="tab" data-link="source">Source</a>
        </li>
</ul>

<div class="tab-content">
    <div class="tab-pane fade active in" id="info">
        <p class="comment">
            <h3>File</h3>
        </p>
        <p class="comment">
            <code>src/dropdown/abstract-dropdown-view.class.ts</code>
        </p>


            <p class="comment">
                <h3>Description</h3>
            </p>
            <p class="comment">
                <p>A component that intends to be used within <code>Dropdown</code> must provide an implementation that extends this base class.
It also must provide the base class in the <code>@Component</code> meta-data.
ex: <code>providers: [{provide: AbstractDropdownView, useExisting: forwardRef(() =&gt; MyDropdownView)}]</code></p>

            </p>




        <section data-compodoc="block-metadata">
            <h3>Metadata</h3>
            <table class="table table-sm table-hover metadata">
                <tbody>

                    <tr>
                        <td class="col-md-3">Selector</td>
                        <td class="col-md-9"><code>[cdsAbstractDropdownView], [ibmAbstractDropdownView]</code></td>
                    </tr>




                </tbody>
            </table>
        </section>

            <section data-compodoc="block-index">
    <h3 id="index">Index</h3>
    <table class="table table-sm table-bordered index-table">
        <tbody>
                <tr>
                    <td class="col-md-4">
                        <h6><b>Properties</b></h6>
                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <ul class="index-list">
                            <li>
                                    <span class="modifier">Public</span>
                                    <span class="modifier">Optional</span>
                                <a href="#listId" >listId</a>
                            </li>
                            <li>
                                    <span class="modifier">Public</span>
                                <a href="#size" >size</a>
                            </li>
                            <li>
                                    <span class="modifier">Public</span>
                                <a href="#type" >type</a>
                            </li>
                        </ul>
                    </td>
                </tr>

                <tr>
                    <td class="col-md-4">
                        <h6><b>Methods</b></h6>
                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <ul class="index-list">
                            <li>
                                <a href="#filterBy" >filterBy</a>
                            </li>
                            <li>
                                <a href="#getCurrentElement" >getCurrentElement</a>
                            </li>
                            <li>
                                <a href="#getCurrentItem" >getCurrentItem</a>
                            </li>
                            <li>
                                <a href="#getListItems" >getListItems</a>
                            </li>
                            <li>
                                <a href="#getNextElement" >getNextElement</a>
                            </li>
                            <li>
                                <a href="#getNextItem" >getNextItem</a>
                            </li>
                            <li>
                                <a href="#getPrevElement" >getPrevElement</a>
                            </li>
                            <li>
                                <a href="#getPrevItem" >getPrevItem</a>
                            </li>
                            <li>
                                <a href="#getSelected" >getSelected</a>
                            </li>
                            <li>
                                <a href="#hasNextElement" >hasNextElement</a>
                            </li>
                            <li>
                                <a href="#hasPrevElement" >hasPrevElement</a>
                            </li>
                            <li>
                                <a href="#initFocus" >initFocus</a>
                            </li>
                            <li>
                                <a href="#onItemsReady" >onItemsReady</a>
                            </li>
                            <li>
                                <a href="#propagateSelected" >propagateSelected</a>
                            </li>
                            <li>
                                <a href="#reorderSelected" >reorderSelected</a>
                            </li>
                        </ul>
                    </td>
                </tr>

                <tr>
                    <td class="col-md-4">
                        <h6><b>Inputs</b></h6>
                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <ul class="index-list">
                            <li>
                                <a href="#items" >items</a>
                            </li>
                        </ul>
                    </td>
                </tr>

                <tr>
                    <td class="col-md-4">
                        <h6><b>Outputs</b></h6>
                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <ul class="index-list">
                            <li>
                                <a href="#blurIntent" >blurIntent</a>
                            </li>
                            <li>
                                <a href="#select" >select</a>
                            </li>
                        </ul>
                    </td>
                </tr>



                    <tr>
                        <td class="col-md-4">
                            <h6><b>Accessors</b></h6>
                        </td>
                    </tr>
                    <tr>
                        <td class="col-md-4">
                            <ul class="index-list">
                                <li>
                                    <a href="#items" >items</a>
                                </li>
                            </ul>
                        </td>
                    </tr>
        </tbody>
    </table>
</section>


            <section data-compodoc="block-inputs">
    <h3 id="inputs">Inputs</h3>
        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="items"></a>
                        <b>items</b>
                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <i>Type : </i>    <code>Array | Observable</code>

                    </td>
                </tr>
                        <tr>
                            <td class="col-md-2" colspan="2">
                                    <div class="io-line">Defined in <a href="" data-line="23" class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:23</a></div>
                            </td>
                        </tr>
                <tr>
                    <td class="col-md-4">
                        <div class="io-description"><p>The items to be displayed in the list within the <code>AbstractDropDownView</code>.</p>
</div>
                    </td>
                </tr>
            </tbody>
        </table>
</section>
            <section data-compodoc="block-outputs">
    <h3 id="outputs">Outputs</h3>
        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="blurIntent"></a>
                        <b>blurIntent</b>
                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <i>Type : </i>    <code>EventEmitter&lt;any&gt;</code>

                    </td>
                </tr>
                        <tr>
                            <td class="col-md-2" colspan="2">
                                    <div class="io-line">Defined in <a href="" data-line="40" class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:40</a></div>
                            </td>
                        </tr>
                <tr>
                    <td class="col-md-4">
                        <div class="io-description"><p>Event to suggest a blur on the view.
Emits <em>after</em> the first/last item has been focused.
ex.
ArrowUp -&gt; focus first item
ArrowUp -&gt; emit event</p>
<p>It&#39;s recommended that the implementing view include a specific type union of possible blurs
ex. <code>@Output() blurIntent = new EventEmitter&lt;&quot;top&quot; | &quot;bottom&quot;&gt;();</code></p>
</div>
                    </td>
                </tr>
            </tbody>
        </table>
        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="select"></a>
                        <b>select</b>
                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <i>Type : </i>    <code>EventEmitter&lt;literal type | []&gt;</code>

                    </td>
                </tr>
                        <tr>
                            <td class="col-md-2" colspan="2">
                                    <div class="io-line">Defined in <a href="" data-line="29" class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:29</a></div>
                            </td>
                        </tr>
                <tr>
                    <td class="col-md-4">
                        <div class="io-description"><p>Emits selection events to controlling classes</p>
</div>
                    </td>
                </tr>
            </tbody>
        </table>
</section>


            <section data-compodoc="block-methods">
    
    <h3 id="methods">
        Methods
    </h3>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="filterBy"></a>
                    <span class="name">
                        <span ><b>filterBy</b></span>
                        <a href="#filterBy"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>filterBy(value: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>)</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="99"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:99</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                                <td>Description</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>value</td>
                                            <td>
                                                            <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                            <td>
                                                    <p>value to filter the list by</p>

                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="getCurrentElement"></a>
                    <span class="name">
                        <span ><b>getCurrentElement</b></span>
                        <a href="#getCurrentElement"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>getCurrentElement()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="86"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:86</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Returns the <code>HTMLElement</code> for the item that is selected within the <code>DropdownList</code>.</p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>    <code>HTMLElement</code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="getCurrentItem"></a>
                    <span class="name">
                        <span ><b>getCurrentItem</b></span>
                        <a href="#getCurrentItem"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>getCurrentItem()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="82"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:82</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Returns the <code>ListItem</code> that is selected within <code>DropdownList</code>.</p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../interfaces/ListItem.html" target="_self" >ListItem</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="getListItems"></a>
                    <span class="name">
                        <span ><b>getListItems</b></span>
                        <a href="#getListItems"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>getListItems()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="90"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:90</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Guaranteed to return the current items as an Array.</p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../interfaces/ListItem.html" target="_self" >Array&lt;ListItem&gt;</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="getNextElement"></a>
                    <span class="name">
                        <span ><b>getNextElement</b></span>
                        <a href="#getNextElement"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>getNextElement()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="62"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:62</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Returns the <code>HTMLElement</code> for the item that is subsequent to the selected item.</p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>    <code>HTMLElement</code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="getNextItem"></a>
                    <span class="name">
                        <span ><b>getNextItem</b></span>
                        <a href="#getNextItem"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>getNextItem()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="54"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:54</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Returns the <code>ListItem</code> that is subsequent to the selected item in the <code>DropdownList</code>.</p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../interfaces/ListItem.html" target="_self" >ListItem</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="getPrevElement"></a>
                    <span class="name">
                        <span ><b>getPrevElement</b></span>
                        <a href="#getPrevElement"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>getPrevElement()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="74"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:74</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Returns the <code>HTMLElement</code> for the item that precedes the selected item.</p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>    <code>HTMLElement</code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="getPrevItem"></a>
                    <span class="name">
                        <span ><b>getPrevItem</b></span>
                        <a href="#getPrevItem"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>getPrevItem()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="66"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:66</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Returns the <code>ListItem</code> that precedes the selected item within <code>DropdownList</code>.</p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../interfaces/ListItem.html" target="_self" >ListItem</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="getSelected"></a>
                    <span class="name">
                        <span ><b>getSelected</b></span>
                        <a href="#getSelected"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>getSelected()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="78"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:78</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Returns the selected leaf level item(s) within the <code>DropdownList</code>.</p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../interfaces/ListItem.html" target="_self" >ListItem[]</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="hasNextElement"></a>
                    <span class="name">
                        <span ><b>hasNextElement</b></span>
                        <a href="#hasNextElement"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>hasNextElement()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="58"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:58</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Returns a boolean if the currently selected item is preceded by another</p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="hasPrevElement"></a>
                    <span class="name">
                        <span ><b>hasPrevElement</b></span>
                        <a href="#hasPrevElement"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>hasPrevElement()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="70"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:70</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Returns a boolean if the currently selected item is followed by another</p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="initFocus"></a>
                    <span class="name">
                        <span ><b>initFocus</b></span>
                        <a href="#initFocus"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>initFocus()</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="104"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:104</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Initializes focus in the list
In most cases this just calls <code>getCurrentElement().focus()</code></p>
</div>

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="onItemsReady"></a>
                    <span class="name">
                        <span ><b>onItemsReady</b></span>
                        <a href="#onItemsReady"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>onItemsReady(subcription: () => void)</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="108"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:108</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Subscribe the function passed to an internal observable that will resolve once the items are ready</p>
</div>

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>subcription</td>
                                            <td>
                                                            <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function" target="_blank" >function</a></code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="propagateSelected"></a>
                    <span class="name">
                        <span ><b>propagateSelected</b></span>
                        <a href="#propagateSelected"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>propagateSelected(value: <a href="../interfaces/ListItem.html" target="_self">Array&lt;ListItem&gt;</a>)</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="94"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:94</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Transforms array input list of items to the correct state by updating the selected item(s).</p>
</div>

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>value</td>
                                            <td>
                                                            <code><a href="../interfaces/ListItem.html" target="_self" >Array&lt;ListItem&gt;</a></code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="reorderSelected"></a>
                    <span class="name">
                        <span ><b>reorderSelected</b></span>
                        <a href="#reorderSelected"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
<code>reorderSelected(moveFocus?: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank">boolean</a>)</code>
                </td>
            </tr>


                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="112"
                                    class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:112</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">
                        <div class="io-description"><p>Reorder selected items bringing them to the top of the list</p>
</div>

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>moveFocus</td>
                                            <td>
                                                            <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>
                                            </td>

                                            <td>
                                                    Yes
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
</section>
            <section data-compodoc="block-properties">
    
    <h3 id="inputs">
        Properties
    </h3>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="listId"></a>
                    <span class="name">
                            <span class="modifier">Public</span>
                            <span class="modifier">Optional</span>
                        <span ><b>listId</b></span>
                        <a href="#listId"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
                <tr>
                    <td class="col-md-4">
                        <i>Type : </i>        <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>

                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                                <div class="io-line">Defined in <a href="" data-line="50" class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:50</a></div>
                        </td>
                    </tr>


        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="size"></a>
                    <span class="name">
                            <span class="modifier">Public</span>
                        <span ><b>size</b></span>
                        <a href="#size"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
                <tr>
                    <td class="col-md-4">
                        <i>Type : </i>    <code>&quot;sm&quot; | &quot;md&quot; | &quot;lg&quot;</code>

                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <i>Default value : </i><code>&quot;md&quot;</code>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                                <div class="io-line">Defined in <a href="" data-line="49" class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:49</a></div>
                        </td>
                    </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-description"><p>Specifies the render size of the items within the <code>AbstractDropdownView</code>.</p>
</div>
                </td>
            </tr>

        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="type"></a>
                    <span class="name">
                            <span class="modifier">Public</span>
                        <span ><b>type</b></span>
                        <a href="#type"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
                <tr>
                    <td class="col-md-4">
                        <i>Type : </i>    <code>&quot;single&quot; | &quot;multi&quot;</code>

                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <i>Default value : </i><code>&quot;single&quot;</code>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                                <div class="io-line">Defined in <a href="" data-line="45" class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:45</a></div>
                        </td>
                    </tr>

            <tr>
                <td class="col-md-4">
                    <div class="io-description"><p>Specifies whether or not the <code>DropdownList</code> supports selecting multiple items as opposed to single
item selection.</p>
</div>
                </td>
            </tr>

        </tbody>
    </table>
</section>

            <section data-compodoc="block-accessors">
    <h3 id="accessors">
        Accessors
    </h3>
        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="items"></a>
                        <span class="name"><b>items</b><a href="#items"><span class="icon ion-ios-link"></span></a></span>
                    </td>
                </tr>

                <tr>
                    <td class="col-md-4">
                        <span class="accessor"><b>get</b><code>items()</code></span>
                    </td>
                </tr>
                            <tr>
                                <td class="col-md-4">
                                    <div class="io-line">Defined in <a href="" data-line="25" class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:25</a></div>
                                </td>
                            </tr>

                <tr>
                    <td class="col-md-4">
                        <span class="accessor"><b>set</b><code>items(value: <a href="../interfaces/ListItem.html" target="_self">Array&lt;ListItem&gt; | Observable&lt;Array&lt;ListItem&gt;&gt;</a>)</code></span>
                    </td>
                </tr>
                            <tr>
                                <td class="col-md-4">
                                    <div class="io-line">Defined in <a href="" data-line="23" class="link-to-prism">src/dropdown/abstract-dropdown-view.class.ts:23</a></div>
                                </td>
                            </tr>
                    <tr>
                        <td class="col-md-4">
                                <div class="io-description"><p>The items to be displayed in the list within the <code>AbstractDropDownView</code>.</p>
</div>

                                <div class="io-description">
                                        <b>Parameters :</b>
                                        <table class="params">
                                            <thead>
                                                <tr>
                                                    <td>Name</td>
                                                        <td>Type</td>
                                                    <td>Optional</td>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                    <tr>
                                                            <td>value</td>
                                                    
                                                            <td>
                                                                            <code><a href="../interfaces/ListItem.html" target="_self" >Array&lt;ListItem&gt; | Observable&lt;Array&lt;ListItem&gt;&gt;</a></code>
                                                            </td>
                                                    
                                                        <td>
                                                                No
                                                        </td>
                                                        
                                                    </tr>
                                            </tbody>
                                        </table>
                                </div>
                                <div>
                                </div>
                                <div class="io-description">
                                    <b>Returns : </b>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>

                                </div>
                        </td>
                    </tr>
            </tbody>
        </table>
</section>

    </div>


    <div class="tab-pane fade  tab-source-code" id="source">
        <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
	Input,
	Output,
	EventEmitter,
	Directive
} from &quot;@angular/core&quot;;
import { ListItem } from &quot;./list-item.interface&quot;;
import { Observable } from &quot;rxjs&quot;;


/**
 * A component that intends to be used within &#x60;Dropdown&#x60; must provide an implementation that extends this base class.
 * It also must provide the base class in the &#x60;@Component&#x60; meta-data.
 * ex: &#x60;providers: [{provide: AbstractDropdownView, useExisting: forwardRef(() &#x3D;&gt; MyDropdownView)}]&#x60;
 */
@Directive({
	selector: &quot;[cdsAbstractDropdownView], [ibmAbstractDropdownView]&quot;
})
export class AbstractDropdownView {
	/**
	 * The items to be displayed in the list within the &#x60;AbstractDropDownView&#x60;.
	 */
	@Input() set items(value: Array&lt;ListItem&gt; | Observable&lt;Array&lt;ListItem&gt;&gt;) { }

	get items(): Array&lt;ListItem&gt; | Observable&lt;Array&lt;ListItem&gt;&gt; { return; }
	/**
	 * Emits selection events to controlling classes
	 */
	@Output() select: EventEmitter&lt;{item: ListItem } | ListItem[]&gt;;
	/**
	 * Event to suggest a blur on the view.
	 * Emits _after_ the first/last item has been focused.
	 * ex.
	 * ArrowUp -&gt; focus first item
	 * ArrowUp -&gt; emit event
	 *
	 * It&#x27;s recommended that the implementing view include a specific type union of possible blurs
	 * ex. &#x60;@Output() blurIntent &#x3D; new EventEmitter&lt;&quot;top&quot; | &quot;bottom&quot;&gt;();&#x60;
	 */
	@Output() blurIntent: EventEmitter&lt;any&gt;;
	/**
	 * Specifies whether or not the &#x60;DropdownList&#x60; supports selecting multiple items as opposed to single
	 * item selection.
	 */
	public type: &quot;single&quot; | &quot;multi&quot; &#x3D; &quot;single&quot;;
	/**
	 * Specifies the render size of the items within the &#x60;AbstractDropdownView&#x60;.
	 */
	public size: &quot;sm&quot; | &quot;md&quot; | &quot;lg&quot; &#x3D; &quot;md&quot;;
	public listId?: string;
	/**
	 * Returns the &#x60;ListItem&#x60; that is subsequent to the selected item in the &#x60;DropdownList&#x60;.
	 */
	getNextItem(): ListItem { return; }
	/**
	 * Returns a boolean if the currently selected item is preceded by another
	 */
	hasNextElement(): boolean { return; }
	/**
	 * Returns the &#x60;HTMLElement&#x60; for the item that is subsequent to the selected item.
	 */
	getNextElement(): HTMLElement { return; }
	/**
	 * Returns the &#x60;ListItem&#x60; that precedes the selected item within &#x60;DropdownList&#x60;.
	 */
	getPrevItem(): ListItem { return; }
	/**
	 * Returns a boolean if the currently selected item is followed by another
	 */
	hasPrevElement(): boolean { return; }
	/**
	 * Returns the &#x60;HTMLElement&#x60; for the item that precedes the selected item.
	 */
	getPrevElement(): HTMLElement { return; }
	/**
	 * Returns the selected leaf level item(s) within the &#x60;DropdownList&#x60;.
	 */
	getSelected(): ListItem[] { return; }
	/**
	 * Returns the &#x60;ListItem&#x60; that is selected within &#x60;DropdownList&#x60;.
	 */
	getCurrentItem(): ListItem { return; }
	/**
	 * Returns the &#x60;HTMLElement&#x60; for the item that is selected within the &#x60;DropdownList&#x60;.
	 */
	getCurrentElement(): HTMLElement { return; }
	/**
	 * Guaranteed to return the current items as an Array.
	 */
	getListItems(): Array&lt;ListItem&gt; { return; }
	/**
	 * Transforms array input list of items to the correct state by updating the selected item(s).
	 */
	propagateSelected(value: Array&lt;ListItem&gt;): void {}
	/**
	 *
	 * @param value value to filter the list by
	 */
	filterBy(value: string): void {}
	/**
	 * Initializes focus in the list
	 * In most cases this just calls &#x60;getCurrentElement().focus()&#x60;
	 */
	initFocus(): void {}
	/**
	 * Subscribe the function passed to an internal observable that will resolve once the items are ready
	 */
	onItemsReady(subcription: () &#x3D;&gt; void): void {}
	/**
	 * Reorder selected items bringing them to the top of the list
	 */
	reorderSelected(moveFocus?: boolean): void {}
}
</code></pre>
    </div>

</div>














                   </div><div class="search-results">
    <div class="has-results">
        <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
        <ul class="search-results-list"></ul>
    </div>
    <div class="no-results">
        <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
    </div>
</div>
</div>
               <!-- END CONTENT -->
           </div>
       </div>

          <label class="dark-mode-switch">
               <input type="checkbox">
               <span class="slider">
                    <svg class="slider-icon" viewBox="0 0 24 24" fill="none" height="20" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" width="20" xmlns="http://www.w3.org/2000/svg">
                    <path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
                    </svg>
               </span>
          </label>

       <script>
            var COMPODOC_CURRENT_PAGE_DEPTH = 1;
            var COMPODOC_CURRENT_PAGE_CONTEXT = 'directive';
            var COMPODOC_CURRENT_PAGE_URL = 'AbstractDropdownView.html';
            var MAX_SEARCH_RESULTS = 15;
       </script>

       <script>
               $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
               checkToggle(darkModeState);
               if ($darkModeToggleSwitchers.length > 0) {
                    for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
                         $darkModeToggleSwitchers[i].addEventListener('change', function (event) {
                              darkModeState = !darkModeState;
                              toggleDarkMode(darkModeState);
                         });
                    }
               }
          </script>

       <script src="../js/libs/custom-elements.min.js"></script>
       <script src="../js/libs/lit-html.js"></script>

       <script src="../js/menu-wc.js" defer></script>
       <script nomodule src="../js/menu-wc_es5.js" defer></script>

       <script src="../js/libs/bootstrap-native.js"></script>

       <script src="../js/libs/es6-shim.min.js"></script>
       <script src="../js/libs/EventDispatcher.js"></script>
       <script src="../js/libs/promise.min.js"></script>
       <script src="../js/libs/zepto.min.js"></script>

       <script src="../js/compodoc.js"></script>

       <script src="../js/tabs.js"></script>
       <script src="../js/menu.js"></script>
       <script src="../js/libs/clipboard.min.js"></script>
       <script src="../js/libs/prism.js"></script>
       <script src="../js/sourceCode.js"></script>
          <script src="../js/search/search.js"></script>
          <script src="../js/search/lunr.min.js"></script>
          <script src="../js/search/search-lunr.js"></script>
          <script src="../js/search/search_index.js"></script>
       <script src="../js/lazy-load-graphs.js"></script>


    

	<footer class="carbon">
		<dds-footer-container key="footer" disable-locale-button="true" size="micro" />
	</footer>

	<script
		key="8"
		type="module"
		src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/footer.min.js">
	</script>

	<!-- Storybook override -->
	<script>
		document.title = "Carbon Components Angular";
	</script>

	<script
		src="//1.www.s81c.com/common/stats/ibm-common.js"
		type="text/javascript"
		async="async">
	</script>
</body>
</html>