Closed xrkffgg closed 3 years ago
@kerm1it 来 see see
Merging #9 (f5cf9e2) into master (3f86668) will increase coverage by
0.02%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #9 +/- ##
==========================================
+ Coverage 98.02% 98.05% +0.02%
==========================================
Files 3 3
Lines 152 154 +2
Branches 44 46 +2
==========================================
+ Hits 149 151 +2
Misses 3 3
Impacted Files | Coverage Δ | |
---|---|---|
src/ResizableTextArea.tsx | 98.36% <ø> (ø) |
|
src/index.tsx | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3f86668...f5cf9e2. Read the comment docs.
@afc163 @kerm1it @zombieJ PTAL
我有点担心 ant-design/ant-design#29612 算不算过度需求,onPressEnter
本身已经带了 shift
信息。代码也没有复杂到需要封装一个额外 api 的感觉:
<TextArea
onPressEnter={(e) => {
if (!e.shiftKey) {
e.preventDefault();
}
}}
/>
如果用户未来需要自定义条件换行,那是不是又要变成这种:
<TextArea
newLine={() => {
if (this.state.a) {
return true;
}
return 'ShiftEnter';
}}
/>
赞同~
所以自定义换行现在支持了么
close https://github.com/ant-design/ant-design/issues/29612