integrates PR # 1260: filteredItems is not exported anymore

This commit is contained in:
davideraccagni 2022-04-21 00:00:04 +02:00
commit 5ca0b83137
4 changed files with 6 additions and 22 deletions

View file

@ -295,8 +295,7 @@ export interface AutoCompleteItem {
| open | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to open the dropdown |
| selectedItem | <code>let</code> | Yes | <code>AutoCompleteItem</code> | <code>undefined</code> | Specify the selected item |
| selectedId | <code>let</code> | Yes | <code>AutoCompleteItemId</code> | <code>undefined</code> | Specify the selected item id |
| filteredItems | <code>let</code> | Yes | <code>[]</code> | <code>[]</code> | -- |
| items | <code>let</code> | No | <code>AutoCompleteItem[]</code> | <code>[]</code> | Set the dropdown items |
| items | <code>let</code> | No | <code>AutoCompleteItem[]</code> | <code>[]</code> | Set the full list of items |
| itemToString | <code>let</code> | No | <code>(item: AutoCompleteItem) => string</code> | <code>(item) => item.text &#124;&#124; item.id</code> | Override the display of a dropdown item |
| type | <code>let</code> | No | <code>"default" &#124; "inline"</code> | <code>"default"</code> | Specify the type of dropdown |
| direction | <code>let</code> | No | <code>"bottom" &#124; "top"</code> | <code>"bottom"</code> | Specify the direction of the dropdown menu |

View file

@ -238,7 +238,7 @@
{
"name": "items",
"kind": "let",
"description": "Set full list of items",
"description": "Set the full list of items",
"type": "AutoCompleteItem[]",
"value": "[]",
"isFunction": false,
@ -246,16 +246,6 @@
"constant": false,
"reactive": false
},
{
"name": "filteredItems",
"kind": "let",
"type": "[]",
"value": "[]",
"isFunction": false,
"isFunctionDeclaration": false,
"constant": false,
"reactive": true
},
{
"name": "itemToString",
"kind": "let",

View file

@ -8,13 +8,11 @@
*/
/**
* Set the dropdown items
* Set the full list of items
* @type {AutoCompleteItem[]}
*/
export let items = [];
export let filteredItems = [];
/**
* Override the display of a dropdown item
* @type {(item: AutoCompleteItem) => string}
@ -112,6 +110,8 @@
const dispatch = createEventDispatcher();
let filteredItems = [];
let highlightedIndex = -1;
let innerValue = undefined;

View file

@ -13,16 +13,11 @@ export interface AutoCompleteItem {
export interface AutoCompleteProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/**
* Set the dropdown items
* Set the full list of items
* @default []
*/
items?: AutoCompleteItem[];
/**
* @default []
*/
filteredItems?: [];
/**
* Override the display of a dropdown item
* @default (item) => item.text || item.id