question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show only the last group

See original GitHub issue

Hello! Since stackoverflow is not responding to me, I ask for help here. I’m trying to find an opportunity or a ready-made example of functions for displaying only the last group, could you tell me? Here is an example of my code:

var lastGr = function(value, count, data, group){
    return group(count) > group(count)-1; // Show only the last group
};

var table = new Tabulator("#tables", {
    groupStartOpen:lastGr,
...

Can I display only the last group and hide the rest?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tentuscommented, Mar 19, 2019

I realized I had overlooked an obvious call that fixed a number of issues in my previous response, so I’ve edited the answer for posterity.

1reaction
tentuscommented, Mar 19, 2019

Hrm, looks like a cornercase with the pagination, I think?

You could hack around it by using

var table = new Tabulator("#tables", {
	data:tabledata,
	reactiveData:true,
	history:true,
	groupStartOpen: function (value, count, data, group) {
		return value === group.getTable().getGroups().slice(-1)[0].getKey();
	},
	groupBy:"numb",
...
Read more comments on GitHub >

github_iconTop Results From Across the Web

Regex only capturing last instance of capture group in match
So we enter the group again, and match and capture b . This capture overwrites the previous one, hence \1 does now contain...
Read more >
Filtering the 'Assignment group' to display only g... - ServiceNow
Solved: Hi, I am having one custom field 'Opened By Group' on one of my catalog item. It is having another field 'Requested...
Read more >
Groups & Capturing Groups - Regular Expressions Basics
Note: If you apply a repetition to a group, only the last match of the repetition is stored. ([\w])+? will only give you...
Read more >
Outline (group) data in a worksheet - Microsoft Support
Use an outline to group data and quickly display summary rows or columns, or to reveal the detail data for each group.
Read more >
Regex Capture Groups and Back-References - RexEgg
Discusses the details of back-references and group numbering. ... The capturing parentheses you see in a pattern only capture a single group.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found