How can I add a custom column menu tab in ag-grid? - ag-grid

Is there a way to add a custom column menu tab with my own favourite icon which on click would render my custom react component?
something like
myColDef.menuTabs: ['generalMenuTab', 'filterMenuTab', 'myCustomMenuTab']
FYI I'm using v12.0.2

What you're after can't be done I'm afraid. The grid supports React components in all sorts of ways (renderers, editors, filters etc), but not via the column menu.
I've updated the docs page to remove the gibberish issue - it'll be fixed properly in the next release, thanks for highlighting this.

This would be helpful to have. In particular for us, we'd like to filter based off row properties, and not row values. Creating our own tab to filter by cell colors that we have assigned with our own set of labels would be useful.

I agree that it would be a nice feature to have. Apparently, there's no quick out-of-the-box solution to do it. The only workaround I see is to implement your own custom Header component which would display any buttons your want.
There you can put a button to open your own custom menu, which you can implement as any regular UI component. It also means you'll need to manually implement all standard menu options that Ag-Grid provides out of the box if you need them.

Related

How to remove field from cell / row properties dialog in TinyMCE

I need to remove some cell/row properties field like Scope, H Align & V Align. Any way to remove this field.
Cell Properties:
Row Properties:
Thanks.
The table plugin's documentation can be found here:
https://www.tiny.cloud/docs/plugins/table/
There is not a way to hide these specific fields via configuration so your best solution would be to copy the table plugin and modify the code that displays these dialogs to hide the elements you don't want shown.
As a hack, you could simply add a "display:none!important" style targetting the elements you want to have hidden in the dialogs.
I advise against removing them from the DOM, as the tinyMCE plugin could be targeting them, thus generating javascript errors in the console, and possibly breaking things. Hiding them is a much safer hack.

How can I place multiple things in an ag-grid cell?

ag-grid has some nice feature for my application needs and I plan to use it. However, I want to know whether it's possible to place multiple things in a single cell. Specifically, I want to place a multi-line code snippet, a "copy me" button and some link. Is this possible?
Multi-line content with AutoRowHeight - https://www.ag-grid.com/javascript-grid-row-height/#auto-row-height
Buttons and Links with Custom CellRenderer Components - https://www.ag-grid.com/javascript-grid-cell-rendering-components/#angular-cell-render-components
Links can also be done with cellClicked event - https://www.ag-grid.com/javascript-grid-events/#selection

show and hide tabs dynamically in touch ui -AEM

I have a requirement, where I need to show few tabs on selection of a value from a drop down.
I have done this in classic UI. But not sure how to proceed for Touch UI. I know that we can use JQuery, Can anyone let me know the approach I can use.
Its fairly simple, look at the OOTB List Component /libs/foundation/components/list. The selection dropdown is defined - /libs/foundation/components/list/cq:dialog/content/items/column/items/listFrom, look at property class and cq-dialog-dropdown-showhide-target these are used to manage hide and show.
Now from here look at the dropdown values under - /libs/foundation/components/list/cq:dialog/content/items/column/items/listFrom/items these values trigger the hide and show mapping to property showhidetargetvalue as in /libs/foundation/components/list/cq:dialog/content/items/column/items/setDescendants

How can I customize partstack header in rcp application

I am trying to customize PartStack header of a view in rcp application. My goal is to customize the coloring of the header and to add date and time to it and hide minimize and maximize buttons. Buttons can be hidden using css but other goals give me hard time. At the moment I am looking to use a custom renderer by overriding some methods in StackRenderer class. Is that a right approach or is there another renderer that I shoud use?
If you don't want the min/max buttons then do not include MinMaxAddon in the Add On list in the Application.e4xmi.
Using a custom renderer for StackRenderer is useful for changing the text of the part tabs items. If you want to put text elsewhere on the part stack line you will probably need to look at the MinMaxAddon to see how it does that.

How to implement a image list control with SWT?

Does anybody have any idea on how to easily implement a image list(like the windows explorer with medium icons) control with swt? it seems like that it could be done easily with CListCtrl in c++ on windows, but does not seem to be easy with swt? any hints are appreciated!
Up to me, you need to create your own widget (check e.g. http://www.snip2code.com/Snippet/11489/Custom-SWT-List-Box) and add composite items to your custom list.
If vertical-only scrolling is enough, I suggest you rely on a single column TableViewer. This is what I did in a project where I needed a gallery-like window allowing the user to pick a graphical component based on displayed thumbnails.
You just need to implement the proper TableLabelProvider.getColumnImage and return the desired thumbnail corresponding to your list entry.
That gives a pretty decent list-like rendering.
In addition, TableViewer API is very well documented.