feat(breaking): selectedIndex -> selectedId in ComboBox

This commit is contained in:
K.Kiyokawa 2022-01-17 13:13:20 +09:00
commit a260a75eb8
5 changed files with 74 additions and 88 deletions

View file

@ -1395,11 +1395,10 @@
"reactive": false
},
{
"name": "selectedIndex",
"name": "selectedId",
"kind": "let",
"description": "Set the selected item by value index",
"type": "number",
"value": "-1",
"description": "Set the selected item by value id",
"type": "string",
"isFunction": false,
"isFunctionDeclaration": false,
"constant": false,
@ -1616,7 +1615,7 @@
"kind": "function",
"description": "Clear the combo box programmatically",
"type": "(options?: { focus?: boolean; }) => void",
"value": "() => { prevSelectedIndex = undefined; selectedIndex = -1; highlightedIndex = -1; highlightedId = undefined; selectedId = undefined; selectedItem = undefined; open = false; inputValue = \"\"; if (options?.focus !== false) ref?.focus(); }",
"value": "() => { prevSelectedId = null; highlightedIndex = -1; highlightedId = undefined; selectedId = undefined; selectedItem = undefined; open = false; inputValue = \"\"; if (options?.focus !== false) ref?.focus(); }",
"isFunction": true,
"isFunctionDeclaration": true,
"constant": false,
@ -1628,7 +1627,7 @@
{
"type": "dispatched",
"name": "select",
"detail": "{ selectedId: string; selectedIndex: number; selectedItem: ComboBoxItem }"
"detail": "{ selectedId: string; selectedItem: ComboBoxItem }"
},
{ "type": "forwarded", "name": "keydown", "element": "input" },
{ "type": "forwarded", "name": "keyup", "element": "input" },