Adding an item to the ColumnControl?
Adding an item to the ColumnControl?

Link to test case: https://coffee-chickie-94.tiiny.site/
Description of problem:
I was looking at the adding custom control page in the documentation :
but I couldn't add a button to the columncontrol hamburger menu. How can I do that?
This is my code: https://beige-lenna-71.tiiny.site/
This question has an accepted answers - jump to answer
Answers
Also, in the menu, how can I get the current column? I want to add a 'Group by' option to the menu, so when it's selected, the table will be grouped by the current column.
There is a Button class in ColumControl which you could use -
new DataTable.ColumnControl.Button(...)
.It would probably be best to take a look at how some of the other buttons operate - e.g. the orderAsc one.
Excellent idea about row grouping! I reckon that should be a built in option that.
I can take a look at adding that, or would welcome a pull request if you want to take a crack at it.
Allan
@allan I had time this morning and I tried to build the project in macos but building the ColumnControl extension gave error and examples didn't render corectly, so I need to make it using button.
I tried like that but couldn't make it work. Any hints?
I can update the docs with the working example if I can successfully make it
ColumControl's Button class doesn't accept a constructor like you have there. It expects a single argument - a DataTables API instance. You then use methods such as
handler
to add the event handler function. See theorderAsc
link I gave above for how it should be used.Allan