項目がフォーカスを取得するかどうかを取得または設定します。デフォルトで無効です。 有効な場合、ドロップダウン項目にタブ インデックスが指定され、アクティブな場合にフォーカスされます。これには、ドロップダウンを開き、キーボード ナビゲーションを使用して移動すると選択した項目のアクティブ化が含まれます。
注: IgxDropDownItemNavigation ディレクティブの使用時はフォーカスの移動に注意してください。キーボード イベントを処理するためにディレクティブを各フォーカス可能な項目に配置または共有の先祖に配置します。
// 取得
let dropDownAllowsItemFocus = this.dropdown.allowItemsFocus;
<!--set-->
<igx-drop-down [allowItemsFocus]='true'></igx-drop-down>
ドロップダウンの高さを取得または設定します。
// 取得
let myDropDownCurrentHeight = this.dropdown.height;
<!--set-->
<igx-drop-down [height]='400px'></igx-drop-down>
ドロップ ダウンのコンテナの最大の高さを取得または設定します。
// 取得
let maxHeight = this.dropdown.maxHeight;
<!--set-->
<igx-drop-down [maxHeight]='200px'></igx-drop-down>
ドロップダウンが閉じられた後に発生されます。
<igx-drop-down (onClosed)='handleClosed()'></igx-drop-down>
ドロップダウンが閉じられる前に発生されます。
<igx-drop-down (onClosing)='handleClosing()'></igx-drop-down>
ドロップダウンが開かれた後に発生されます。
<igx-drop-down (onOpened)='handleOpened()'></igx-drop-down>
ドロップダウンが開かれる前に発生されます。
<igx-drop-down (onOpening)='handleOpening()'></igx-drop-down>
選択を完了する前にアイテム選択が変更されるときに発生されます。
<igx-drop-down (onSelection)='handleSelection()'></igx-drop-down>
ドロップダウンの幅を取得または設定します。
// 取得
let myDropDownCurrentWidth = this.dropdown.width;
<!--set-->
<igx-drop-down [width]='160px'></igx-drop-down>
ドロップダウンが閉じたかどうかを取得します。
let isCollapsed = this.dropdown.collapsed;
コンポーネントのテーマを返します。
デフォルト テーマは comfortable
です。
利用可能なオプションは comfortable
、cosy
、および compact
です。
let componentTheme = this.component.displayDensity;
コンポーネントのテーマを設定します。
ドロップダウンの HTML 要素を取得します。
let myDropDownElement = this.dropdown.element;
すべてのヘッダー項目を取得します。
let myDropDownHeaderItems = this.dropdown.headers;
ドロップダウンの id を取得または設定します。
// 取得
let myDropDownCurrentId = this.dropdown.id;
<!--set-->
<igx-drop-down [id]='newDropDownId'></igx-drop-down>
ドロップダウンの id を取得または設定します。
// 取得
let myDropDownCurrentId = this.dropdown.id;
<!--set-->
<igx-drop-down [id]='newDropDownId'></igx-drop-down>
すべてのヘッダー以外の項目を取得します。
let myDropDownItems = this.dropdown.items;
ドロップダウンの内部リスト ボックスの Id。
現在選択している項目を取得します。
let currentItem = this.dropdown.selectedItem;
ドロップダウンの選択をクリアします。
this.dropdown.clearSelection();
ドロップダウンを閉じます。
this.dropdown.close();
指定されたインデックスにある項目へ移動。 ドロップダウンのデータが仮想化されている場合は、仮想化されたデータ内のアイテムのインデックスを渡します。
Keydown ハンドラー
ドロップダウンを開きます。
this.dropdown.open();
項目をインデックスで選択します。
選択する項目。ドロップダウンで igxFor が使用されている場合は、データのインデックスを渡します。
ドロップダウンを切り替えます。
this.dropdown.toggle();
Ignite UI for Angular DropDown - ヘルプ
Ignite UI for Angular Drop Down は、単一項目の選択が可能なグループ項目をスクロール付きのリストで表示します。 項目をクリックまたはタップして選択するとドロップダウンが閉じられます。 例: