Skip to content
Closed
Changes from 1 commit
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
3 changes: 1 addition & 2 deletions src/SelectInput/Content/SingleContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ const SingleContent = React.forwardRef<HTMLInputElement, SharedContentProps>(
if (displayValue && selectContext?.flattenOptions) {
const option = selectContext.flattenOptions.find((opt) => opt.value === displayValue.value);
if (option?.data) {
const { label, value, className, style, key, ...rest } = option.data;
const { className, style } = option.data;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是得考虑 fieldNames 配置? 还是说这里的 label value 和 key 都是 merge 过的。另外看看能不能加一个测试用例。

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我重新修改了一下,这个 PR 我是想将不合法的属性不注入到 div 上,按我的理解和 fieldNames 的配置是不是没有关系


restProps = {
...restProps,
...rest,
title: getTitle(option.data),
className: clsx(restProps.className, className),
style: { ...restProps.style, ...style },
Expand Down
Loading