Skip to content

Commit

Permalink
feat(pro:search): add quick select panel support
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 committed Apr 10, 2023
1 parent c758931 commit 888d35a
Show file tree
Hide file tree
Showing 51 changed files with 2,294 additions and 830 deletions.
5 changes: 4 additions & 1 deletion packages/components/_private/overflow/src/Overflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ export default defineComponent({
throwError('components/_private/overflow', 'item slot must be provided')
}
const nodeContent = slots.item?.(item) ?? ''

const key = props.getKey(item)
return (
<Item
{...itemSharedProps}
itemKey={props.getKey(item)}
key={key}
itemKey={key}
display={index < displayCount.value}
onSizeChange={(itemEl: Element, key?: VKey) => setItemWidth(key!, itemEl)}
>
Expand Down
2 changes: 1 addition & 1 deletion packages/components/select/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const selectPanelProps = {
onScrolledBottom: [Function, Array] as PropType<MaybeArray<() => void>>,

// private
_virtualScrollHeight: { type: Number, default: 256 },
_virtualScrollHeight: { type: [Number, String] as PropType<number | 'auto' | '100%'>, default: 256 },
_virtualScrollItemHeight: { type: Number, default: 32 },
} as const

Expand Down
14 changes: 14 additions & 0 deletions packages/pro/search/demo/QuickSelect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
order: 0
title:
zh: 快捷面板
en: Quick select panel
---

## zh

通过 `searchField.quickSelect` 配置支持在快捷搜索面板展示搜索项。

## en

Display searchField panel within quick select panel via `searchField.quickSelect`.

0 comments on commit 888d35a

Please sign in to comment.