element icon indicating copy to clipboard operation
element copied to clipboard

[feature request] can the clearable clear default be null, not ''.

Open sixawnstar opened this issue 5 years ago • 7 comments

Existing Component

Component Name

select

Description

clearable 清空默认值可以为null吗,不是“”。往后端传数据传“”会有问题,所以只能传null。

sixawnstar avatar Nov 13 '19 01:11 sixawnstar

Translation of this issue:

Existing Component

yes

Component Name

Select

Description

Can the clearable clear default be null, not ''. There will be a problem in sending data to "" from the back end, so only null can be passed.

element-bot avatar Nov 13 '19 01:11 element-bot

。。。。后端处理

xrkffgg avatar Nov 14 '19 06:11 xrkffgg

。。。。后端处理

这明显是设计缺陷,一般后台mybatis是依据 值是否 为null,有则传入,无则不筛选的。 其他ui框架比如ant design 也是 clearable 后为null。 我真的很不理解element 为什么自作主张把清空改为空字符串,真是逗了,前端大佬的思路都那么清奇的吗,好逗

zhuxiujia avatar Dec 25 '19 05:12 zhuxiujia

Existing Component

Component Name

select

Description

clearable 清空默认值可以为null吗,不是“”。往后端传数据传“”会有问题,所以只能传null。

不止select,input输入也是变成‘’,element这么沙雕的操作,真的想弃用了。。。

zhuxiujia avatar Dec 25 '19 06:12 zhuxiujia

一般Select框都是或者有值,或者就直接为null,空算个毛线意思啊

huizhang212 avatar May 08 '20 02:05 huizhang212

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 21 '21 07:07 stale[bot]

Any updates about this?

takkiraz avatar Nov 23 '23 14:11 takkiraz