Skip to content

Conversation

pdrgds
Copy link

@pdrgds pdrgds commented Nov 6, 2019

It doesn't make any sense to receive an array with column items in this function, since this is already done in the "footer" function.

Example: let's say I do just like in the Storybook example:
const columns = [ { dataField: 'price', text: 'Product Price', footer: columnData => columnData.reduce((acc, item) => acc + item, 0) }];

footFormatter should just receive the result of this already executed function so I can format it.

if (!_.isEmptyObject(cellStyle)) cellAttrs.style = cellStyle;

const children = footerFormatter ? footerFormatter(column, index) : text;
const children = footerFormatter ? footerFormatter(text) : text;
Copy link
Member

Choose a reason for hiding this comment

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

hello @pdrgds please give text as first argument but keep index as second argument. thanks

Copy link
Member

@AllenFang AllenFang left a comment

Choose a reason for hiding this comment

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

Please check my comment and change your target branch to develop instead of master. btw, remember to rebase your code. thanks you contribution~

@pdrgds pdrgds changed the base branch from master to develop December 28, 2019 19:08
@pdrgds pdrgds changed the base branch from develop to master December 28, 2019 19:11
@pdrgds pdrgds closed this Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants