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

Push column argument to cell's customRender function call. #1513

Merged
merged 1 commit into from
Dec 4, 2019
Merged

Push column argument to cell's customRender function call. #1513

merged 1 commit into from
Dec 4, 2019

Conversation

StenvL
Copy link
Contributor

@StenvL StenvL commented Dec 4, 2019

First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!

[中文版模板 / Chinese template]

This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

What's the background?

  1. Describe the source of requirement.
    Need of creating grouping row when have slot customRender rule for column.
  2. Resolve what problem.
  3. Related issue link.
    Issue

API Realization (Optional if not new feature)

  1. Basic thought of solution and other optional proposal.
    When using customRender method for table column and have slot customRender rule for column, I need to be able to use slot customRender rule when met some conditions.
  2. List final API realization and usage sample.
    Add a column argument in TableCell module.
    if (customRender) {
      text = customRender(text, record, index, column);
      if (isInvalidRenderCellText(text)) {
        tdProps.attrs = text.attrs || {};
        tdProps.props = text.props || {};
        colSpan = tdProps.attrs.colSpan;
        rowSpan = tdProps.attrs.rowSpan;
        text = text.children;
      }
    }
  1. GIF or snapshot should be provided if includes UI/interactive modification.
    None

What's the effect? (Optional if not new feature)

  1. Does this PR affect user? Which part will be affected?
    Compatible.
  2. What will say in changelog?
    Added access to current column in cell's customRender method.
  3. Does this PR contains potential break change or other risk?
    Guess not.

Changelog description (Optional if not new feature)

  1. English description
    Added access to current column in cell's customRender methiod.
  2. Chinese description (optional)

Self Check before Merge

  • 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

Additional Plan? (Optional if not new feature)

If this PR related with other PR or following info. You can type here.

@netlify
Copy link

netlify bot commented Dec 4, 2019

Deploy preview for ant-desing-vue processing.

Building with commit 45da6ca

https://app.netlify.com/sites/ant-desing-vue/deploys/5de7aec861e59d000a38ae37

@codecov
Copy link

codecov bot commented Dec 4, 2019

Codecov Report

Merging #1513 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1513      +/-   ##
==========================================
+ Coverage    87.9%   87.92%   +0.01%     
==========================================
  Files         156      156              
  Lines        5399     5399              
  Branches     1523     1523              
==========================================
+ Hits         4746     4747       +1     
  Misses        583      583              
+ Partials       70       69       -1
Impacted Files Coverage Δ
components/upload/UploadList.jsx 90.9% <0%> (+1.13%) ⬆️

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 b2717bc...45da6ca. Read the comment docs.

@tangjinzhou tangjinzhou merged commit 1b78a10 into vueComponent:master Dec 4, 2019
@github-actions
Copy link

github-actions bot commented Dec 4, 2020

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants