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

fix(comp:textarea): close icon input content is overwritten(#1005) #1048

Closed
wants to merge 2 commits into from

Conversation

winchesHe
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

close icon overwrites the text

What is the new behavior?

will not overwrite the text

Other information

@idux-bot
Copy link

idux-bot bot commented Jul 29, 2022

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

Merging #1048 (640e577) into main (f948786) will decrease coverage by 0.00%.
The diff coverage is 96.55%.

❗ Current head 640e577 differs from pull request most recent head 54432bf. Consider uploading reports for the commit 54432bf to get more accurate results

@@            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     
Impacted Files Coverage Δ
packages/components/time-picker/src/TimePicker.tsx 30.92% <0.00%> (-0.33%) ⬇️
packages/components/form/src/FormItem.tsx 93.93% <89.13%> (-3.55%) ⬇️
packages/components/textarea/src/Textarea.tsx 99.43% <97.50%> (-0.57%) ⬇️
packages/cdk/popper/src/hooks.ts 98.79% <100.00%> (-0.04%) ⬇️
packages/cdk/popper/src/types.ts 100.00% <100.00%> (ø)
packages/cdk/popper/src/usePopper.ts 97.35% <100.00%> (+0.01%) ⬆️
packages/components/_private/mask/src/Mask.tsx 100.00% <100.00%> (ø)
packages/components/_private/mask/src/types.ts 100.00% <100.00%> (ø)
...ckages/components/_private/overlay/src/Overlay.tsx 97.29% <100.00%> (+0.23%) ⬆️
packages/components/config/src/defaultConfig.ts 100.00% <100.00%> (ø)
... and 25 more

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 f948786...54432bf. Read the comment docs.

@danranVm danranVm linked an issue Jul 29, 2022 that may be closed by this pull request
1 task
@@ -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
Copy link
Member

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(
Copy link
Member

Choose a reason for hiding this comment

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

这里更好的方案,不应该去监听是否存在滚动条。
应该是当存在 suffix 的时候,给一个更大的 padding 会更好?参考 input.

@danranVm
Copy link
Member

danranVm commented Aug 1, 2022

发现好几个组件都存在这个问题,这个我来修复吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[comp:textarea] close icon 被输入内容遮挡
2 participants