-
Notifications
You must be signed in to change notification settings - Fork 141
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
fix(comp:textarea): close icon input content is overwritten(#1005) #1048
Conversation
This preview will be available after the AzureCI is passed. |
Codecov Report
@@ Coverage Diff @@
## main #1048 +/- ##
==========================================
- Coverage 93.75% 93.75% -0.01%
==========================================
Files 314 314
Lines 29940 30114 +174
Branches 3542 3553 +11
==========================================
+ Hits 28069 28232 +163
- Misses 1871 1882 +11
Continue to review full report at Codecov.
|
@@ -110,6 +111,10 @@ describe('Textarea', () => { | |||
|
|||
expect(wrapper.find('.ix-textarea-suffix-hidden').exists()).toBe(false) | |||
|
|||
const res = (renderSuffixFn(true, undefined, '', true, onClear, '', true)?.props as { class: '' }).class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
通过 find 去找 DOM, 而不是这种方式去获取。。。
@@ -74,6 +85,19 @@ export default defineComponent({ | |||
|
|||
useAutoRows(elementRef as Ref<HTMLTextAreaElement>, autoRows, accessor) | |||
|
|||
watch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里更好的方案,不应该去监听是否存在滚动条。
应该是当存在 suffix 的时候,给一个更大的 padding 会更好?参考 input.
发现好几个组件都存在这个问题,这个我来修复吧。 |
PR Checklist
Please check if your PR fulfills the following requirements:
What is the current behavior?
close icon overwrites the text
What is the new behavior?
will not overwrite the text
Other information