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 Affix/index.tsx while offsetTop === 0 and offsetBottom is numberic #10566

Merged
merged 2 commits into from May 18, 2018

Conversation

Projects
None yet
3 participants
@qhxin
Contributor

qhxin commented May 17, 2018

Fix: if offsetTop === 0, it will get undefined, if offsetBottom is type of number, offsetMode will be { top: false, ... }

First of all, thank you for your contribution! :-)

Please makes sure that these checkboxes are checked before submitting your PR, thank you!

  • Make sure that you propose PR to right branch: bugfix for master, feature for latest active branch feature-x.x.
  • Make sure that you follow antd's code convention.
  • Run npm run lint and fix those errors before submitting in order to keep consistent code style.
  • Rebase before creating a PR to keep commit history clear.
  • Add some descriptions and refer relative issues for you PR.

Extra checklist:

if isBugFix :

  • Make sure that you add at least one unit test for the bug which you had fixed.

elif isNewFeature :

  • Update API docs for the component.
  • Update/Add demo to demonstrate new feature.
  • Update TypeScript definition for the component.
  • Add unit tests for the feature.
Update index.tsx
Fix: if offsetTop === 0, it will get undefined, if offsetBottom is type of number, offsetMode will be { top: false, ... }

@qhxin qhxin changed the title from Update index.tsx to fix Affix/index.tsx while offsetTop === 0 and offsetBottom is numberic May 17, 2018

@ant-design-bot

This comment has been minimized.

ant-design-bot commented May 17, 2018

Deploy preview for ant-design ready!

Built with commit 1bb9481

https://deploy-preview-10566--ant-design.netlify.com

@qhxin qhxin closed this May 17, 2018

@qhxin qhxin reopened this May 17, 2018

@codecov

This comment has been minimized.

codecov bot commented May 17, 2018

Codecov Report

Merging #10566 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10566   +/-   ##
=======================================
  Coverage    86.4%    86.4%           
=======================================
  Files         196      196           
  Lines        4795     4795           
  Branches     1339     1339           
=======================================
  Hits         4143     4143           
  Misses        649      649           
  Partials        3        3
Impacted Files Coverage Δ
components/affix/index.tsx 66.66% <0%> (ø) ⬆️

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 963120f...1bb9481. Read the comment docs.

@afc163 afc163 merged commit 7404b7f into ant-design:master May 18, 2018

4 of 5 checks passed

codecov/patch 0% of diff hit (target 86.4%)
Details
codecov/project 86.4% remains the same compared to 963120f
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
security/snyk No new issues
Details
@afc163

This comment has been minimized.

Member

afc163 commented May 18, 2018

Could you add a test case for this?

bors bot added a commit to mozilla/delivery-console that referenced this pull request May 21, 2018

Merge #163
163: Update dependency antd to v3.5.3 r=rehandalal a=renovate[bot]

This Pull Request updates dependency [antd](https://github.com/ant-design/ant-design) from `v3.5.2` to `v3.5.3`



<details>
<summary>Release Notes</summary>

### [`v3.5.3`](https://github.com/ant-design/ant-design/releases/3.5.3)
[Compare Source](ant-design/ant-design@3.5.2...3.5.3)
- 🐞 Fix `Affix` with offsetTop === 0, value becomes `undefined` problem [#&#8203;10566](`ant-design/ant-design#10566)
- 🐞 Fixed issue with shaded `Input.Group` component shadows[#&#8203;10230](`ant-design/ant-design#10230)
- 🐞 Fixed issue where the `Transfer` component checkbox event fired twice [#&#8203;10480](`ant-design/ant-design#10480)
- 💄 Unifying the name of the variable [12d3046](ant-design/ant-design@12d3046)
- 💄 Fine-tuned the style of `Dropdown` [8e2f72f](ant-design/ant-design@8e2f72f)
- 💄 The components of the Chinese document will now be demonstrated using Chinese language packages. [9b17a94](ant-design/ant-design@9b17a94)
- 💄 The main theme switch was changed to `antd-theme-generato`, thanks to the work of [@&#8203;mzohaibqc].
- TypeScript
  - 🐞 Fixed an issue with the type of gutter attribute in `Row` [b7d508e](ant-design/ant-design@b7d508e)
  - 💄 Improved the `Form` component type [#&#8203;10564](`ant-design/ant-design#10564)
  - 💄 Improved the `Button` and `Tag` types[1ed9fed](ant-design/ant-design@1ed9fed)


---


- 🐞 修复了 `Affix` 当 `offsetTop === 0`, 值将变为 `undefined` 的问题 [#&#8203;10566](`ant-design/ant-design#10566)
- 🐞 修复了 `Menu` item 中的高亮链接颜色问题 [09d5e36](ant-design/ant-design@09d5e36)
- 🐞 修复了 `Input.Group` 组件阴影被遮盖的问题 [#&#8203;10230](`ant-design/ant-design#10230)
- 🐞 修复了 `Transfer` 组件 checkbox 事件触发两次的问题 [`#10480`](`ant-design/ant-design#10480)
- 💄 统一 less 的变量命名 [12d3046](ant-design/ant-design@12d3046)
- 💄 微调了 `Dropdown` 的样式 [8e2f72f](ant-design/ant-design@8e2f72f)
- 💄 现在中文文档的组件会用中文语言包进行演示。[9b17a94](ant-design/ant-design@9b17a94)
- 💄 主站主题切换 修改为 `antd-theme-generato` ,感谢 [@&#8203;mzohaibqc] 的工作.
- TypeScript
  - 🐞 修复了 `Row` 中 gutter 属性的类型问题 [b7d508e](ant-design/ant-design@b7d508e)
  - 💄 改进了 `Form` 组件类型 [#&#8203;10564](`ant-design/ant-design#10564)
  - 💄 改进了 `Button` 和 `Tag` 类型 [1ed9fed](ant-design/ant-design@1ed9fed)

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment