Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playground): add placement for Select #348

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions formily/antd/src/locales/Select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export const Select = {
maxTagTextLength: '最多标签文本长度',
showArrow: '显示箭头',
virtual: '开启虚拟滚动',
placement: {
title: '选择框弹出的位置',
dataSource: ['左下', '右下', '左上', '右上'],
},
},
},
},
Expand Down Expand Up @@ -67,6 +71,10 @@ export const Select = {
maxTagTextLength: 'Max Tag Text Length',
showArrow: 'Show Arrow',
virtual: 'Use Virtual Scroll',
placement: {
title: 'Selection Box Position',
dataSource: ['Bottom Left', 'Bottom Right', 'Top Left', 'Top Right'],
},
},
},
},
Expand Down
9 changes: 9 additions & 0 deletions formily/antd/src/schemas/Select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,14 @@ export const Select: ISchema = {
defaultValue: 'middle',
},
},
placement: {
type: 'string',
enum: ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'],
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-component-props': {
defaultValue: 'bottomLeft',
},
},
},
}