In a Data Grid Column we are using in the property headerStyleClass for example the font awesome icon far fa-eye-slash, which is displayed fine in NG1, but does not display in N2.
Is there anything additionally needed in NG2 to use font awesome?
Apart from the position, this works for me by just use ‘far fa-eye-slash’ in the header style class.
Something seems wrong, but can’t tell based on the information you provided
They work perfectly fine in NG1, but not in NG2. The font awesome icon works in a row, but not in the header. Below the data grid and the properties set. The properties belong to the left most column (with checkboxes)
looks exactly the same as what I tested (which worked), the column is most likely a bit to narrow anyway.
Besides that, you really need to look in the browser’s inspector in order to find out what is blocking the icon from showing.
Maybe some ‘old’ NG CSS that prevents it from showing correctly.
Thanks for the comparing with your property settings, removing the font-family property in the following selector solved the problem, i. e. the font-family “blocked” the displaying of the font awesome icon.
In 2024.3.0 -releaseNumber 3943 we observe a problem in data grid headers headerStyleClass-Property. When adding a font awesome icon class, it is not displayed in NGTitanium.
See attached solution (very simple, no database server needed, just one form).
For me I have the same issues in version 2024.3.2.
What I noticed is that it is using Font Awesome 6 free even in our Servoy Packages it is version 5.14.1
I made a sample Solution myself as well with the following results. Sample solution is attached.
Thank you for the reply. And the confirmation of the issue. I also noticed the difference in the FA versions. I’ll open a ticket in the support system.
What I found out is that the Pseudo-element ::before is missing in the header.
My suspicion is that this is the cause of not showing the font awesome icon.
showing a font icon in NG Grid header is indeed not trivial for TiNG.
The :before element created by FA is overruled by the grid’s separator, which is also using the :before
I have some more problems with using font awesome icons in Data Grid headers. For example, for showing the sort icon on a column, we use instead of the default icon the font awesome icon caret-up/caret-down. The two CSS corresponding selectors are:
This worked fine in every Browser for NG1. In NG2, it only works in Safari.
Strange thing is, if I use instead of content ‘\f0d7’ the content ‘\f007’ (user icon), it is shown correctly (of course, it’s in my case not useful, just to show that some icons are displayed). Both icons are in the Font Awesome 6 Free category.
What’s going on here?
Regards,
[attachment=0]caret-down shown in Chrome.png[/attachment]
[attachment=1]user shown in Chrome.png[/attachment]
the icons used in NG Grids ( including sort icons ) are configurable using the NG Grid icon config.
Is a preferable approach compared to force a content with CSS.
Again, thank you very much for the code, it works in all browsers now
I now have only one last challenge with the DBTreeview (Servoy Extra Component), which also works with my current CSS styles in Safari only, but no more in the other browsers (in NG2).
Is there a similar general possibility to style the expand/collapse triangles of the DBTreeview?
My current selectors which work in NG1 for all browsers are: