Ngx-datatable header sorting icons

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior: Current behaviour in ngx-datatable as per below attached screenshot. image

Expected behavior I tried a lot to override this because my expectation whould as per below attached screenshot for sorting Icons image

  • Angular version: Angular 6

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

6reactions
lanxuexingcommented, Apr 18, 2019

try this one?

/deep/ .ngx-datatable{
    .sortable .sort-btn:before {
        font-family: data-table;
        content: "c";
    }
    .sortable .sort-btn.datatable-icon-down:before {
        content: "f";
    }
    .sortable .sort-btn.datatable-icon-up:before {
        content: "e";
    }
}
1reaction
WillHallcommented, Nov 16, 2018

I just overwrote the font settings, like so:

[data-icon]:before {
  font-family: "FontAwesome" !important;
  content: "";
  font-style: normal !important;
  font-weight: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  speak: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[class^="datatable-icon-"]:before,
[class*=" datatable-icon-"]:before {
  font-family: "FontAwesome" !important;
  font-style: normal !important;
  font-weight: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  speak: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.datatable-icon-filter:before {
  content: "\f0b0";
}
.datatable-icon-collapse:before {
  content: "\f147";
}
.datatable-icon-expand:before {
  content: "\f196";
}
.datatable-icon-close:before {
  content: "\f2d3";
}
.datatable-icon-up:before {
  content: "\f0de";
}
.datatable-icon-down:before {
  content: "\f0dd";
}
.datatable-icon-sort:before {
  content: "\f0dc";
}
.datatable-icon-done:before {
  content: "\f00c";
}
.datatable-icon-done-all:before {
  content: "\f05d";
}
.datatable-icon-search:before {
  content: "\f002";
}
.datatable-icon-pin:before {
  content: "\f276";
}
.datatable-icon-add:before {
  content: "\f196";
}
.datatable-icon-left:before {
  content: "\f104";
}
.datatable-icon-right:before {
  content: "\f105";
}
.datatable-icon-skip:before {
  content: "\f101";
}
.datatable-icon-prev:before {
  content: "\f100";
}

if you change the font from fontawesome - you have to change the content to reflect what the new font uses.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show sort icon by default - ngx-datatable-column
Here, the sorting icon is enabled when we click on header title. Is there a way to enable sorting icon by default at...
Read more >
Ngx Datatable Sort Icon - StackBlitz
Ngx Datatable Sort Icon. Starter project for Angular apps that exports to the Angular CLI ... @swimlane/ngx-datatable.
Read more >
swimlane/ngx-datatable - Gitter
Hello AnyOne, Is there any way to disable sort icon in ngx datatable header ? Kabby. @kabb5. @ChandralekhaSelvam When I forgot to add...
Read more >
Inputs - ngx-datatable - GitBook
Custom CSS classes that can be defined to override the icons classes for up/down in sorts and previous/next in the pager. Defaults:.
Read more >
@sortdinc/ngx-datatable - npm
ngx -datatable is an Angular table grid component for presenting large ... TypeScript icon, indicating that this package has built-in type ...
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