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

numberDisplay group/groupAll #1525

Open
gordonwoodhull opened this issue Apr 3, 2019 · 0 comments
Open

numberDisplay group/groupAll #1525

gordonwoodhull opened this issue Apr 3, 2019 · 0 comments

Comments

@gordonwoodhull
Copy link
Contributor

gordonwoodhull commented Apr 3, 2019

By far the most popular and useful way to use a numberDisplay is with a groupAll object. The usage is

numberDisplay
  .group(cf.groupAll()) // just count all records (for example
  .valueAccessor(x => x) // do not try to fetch .value since groupAll.value() returns a value

But apparently it was originally designed to work with ordinary groups, so it also looks for group.all(), sorts that, takes the first one, and extracts its .value.

It's not as simple and straighforward as the renames in the dataTable, dataGrid #855, and dataCount #1499, but we could split this method into .group() and .groupAll(), warn if you use one when you meant the other, or even err out if you give a group to groupAll, and default the valueAccessor to identity (as shown above) if groupAll is used.

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

No branches or pull requests

1 participant