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(input): placeholder bug #918

Merged
merged 5 commits into from
Aug 25, 2021
Merged

Fix(input): placeholder bug #918

merged 5 commits into from
Aug 25, 2021

Conversation

Volankey
Copy link
Collaborator

@Volankey Volankey commented Aug 19, 2021

Closes #914

@vercel
Copy link

vercel bot commented Aug 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tusimple/naive-ui/CkxvD4s7bMsYUhQGQNTiHp1TCBQa
✅ Preview: https://naive-ui-git-fork-volankey-914-tusimple.vercel.app

@Volankey Volankey changed the title 914 Fix(input): placeholder bug #914 Aug 19, 2021
@Volankey Volankey changed the title Fix(input): placeholder bug #914 Fix(input): placeholder bug Aug 19, 2021
@codecov
Copy link

codecov bot commented Aug 19, 2021

Codecov Report

Merging #918 (609694e) into main (f682501) will decrease coverage by 0.42%.
The diff coverage is 100.00%.

❗ Current head 609694e differs from pull request most recent head 3289ec4. Consider uploading reports for the commit 3289ec4 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #918      +/-   ##
==========================================
- Coverage   45.06%   44.64%   -0.43%     
==========================================
  Files         509      509              
  Lines       12463    12460       -3     
  Branches     3503     3501       -2     
==========================================
- Hits         5617     5563      -54     
- Misses       5847     5896      +49     
- Partials      999     1001       +2     
Impacted Files Coverage Δ
src/input/src/Input.tsx 45.09% <100.00%> (+0.18%) ⬆️
src/slider/src/Slider.tsx 16.97% <0.00%> (-9.82%) ⬇️
src/modal/src/BodyWrapper.tsx 30.15% <0.00%> (-7.94%) ⬇️
src/_internal/selection/src/Selection.tsx 31.38% <0.00%> (-3.20%) ⬇️
src/tree-select/src/TreeSelect.tsx 22.80% <0.00%> (-1.76%) ⬇️
src/modal/src/Modal.tsx 29.16% <0.00%> (-1.39%) ⬇️
src/timeline/src/Timeline.tsx 100.00% <0.00%> (ø)
src/data-table/src/styles/index.cssr.ts 100.00% <0.00%> (ø)
src/image/src/ImagePreview.tsx 25.20% <0.00%> (+0.40%) ⬆️

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 f682501...3289ec4. Read the comment docs.

Comment on lines 9 to 11
export function isEmptyValue (value: any): boolean {
return ['', undefined, null].includes(value)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个逻辑看起来不是很通用,别放在这里

@@ -5,6 +5,7 @@
### Fixes

- 修复 `n-notification` 导出的 `NotificationReactive` 类型不可变,关闭 [#876](https://github.com/TuSimple/naive-ui/issues/876)
- 修复 `n-input` `placeholder` bug,关闭 [#914](https://github.com/TuSimple/naive-ui/issues/914)
Copy link
Collaborator

Choose a reason for hiding this comment

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

把问题写全了,语焉不详不好

@07akioni 07akioni merged commit dd92889 into tusen-ai:main Aug 25, 2021
rhengles pushed a commit to arijs/naive-ui that referenced this pull request Oct 20, 2021
* fix(input): placeholder bug

* update changelog

* update doc

* feat(input): optimization

Co-authored-by: Jiwen Bai <56228105@qq.com>
Co-authored-by: 07akioni <07akioni2@gmail.com>
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.

passing value=ref(0) in n-input will show placeholder and 0 simutanuously
4 participants