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(Table): Add warning when Table current is negative number #30242

Merged
merged 1 commit into from Apr 21, 2021
Merged

fix(Table): Add warning when Table current is negative number #30242

merged 1 commit into from Apr 21, 2021

Conversation

wadezhan
Copy link
Contributor

@wadezhan wadezhan commented Apr 21, 2021

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

current传值有误,出现异常结果,提供统告警提示。

current=0, pageSize=5, [1,2,3,4,5].slice(-5, 0) = []
current=-1, pageSize=5, [1,2,3,4,5].slice(-10, -5) = []

📝 Changelog

Language Changelog
🇺🇸 English Add warning when Table current is negative number.
🇨🇳 Chinese Table 当 current 为负数时将显示控制台警告。

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

current=0, pageSize=5, [1,2,3,4,5].slice(-5, 0) = []
current=-1, pageSize=5, [1,2,3,4,5].slice(-10, -5) = []
@github-actions
Copy link
Contributor

github-actions bot commented Apr 21, 2021

@yoyo837
Copy link
Contributor

yoyo837 commented Apr 21, 2021

请完善Changelog,发版的时候自动化工具会读取。

@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Merging #30242 (3921c94) into master (328e2b6) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master    #30242   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          397       397           
  Lines         7524      7525    +1     
  Branches      2107      2107           
=========================================
+ Hits          7524      7525    +1     
Impacted Files Coverage Δ
components/table/Table.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 328e2b6...3921c94. Read the comment docs.

@wadezhan
Copy link
Contributor Author

已补充Changelog @yoyo837

@afc163
Copy link
Member

afc163 commented Apr 21, 2021

Please write PR title in English.

@wadezhan wadezhan changed the title fix: current传参错误导致slice数组截取结果为空的异常提示 fix(Table): Fix Table warning tip when current is not positive number. Apr 21, 2021
@wadezhan
Copy link
Contributor Author

@afc163 ok

@afc163 afc163 changed the title fix(Table): Fix Table warning tip when current is not positive number. fix(Table): Add warning when Table current is negative number Apr 21, 2021
@afc163 afc163 merged commit d9c67ce into ant-design:master Apr 21, 2021
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.

None yet

3 participants