Skip to content

Allow usage of custom sorting indicators on tables #3918

Closed

Description

@xaviarnl

When you use the sorting options of a table, the columns which can be sorted will get a sorting indicator in their column head. Currently, these are arrows.
The arrows are (in my opinion) rather thin, which makes them harder to read. I would much rather have different/thicker arrows here.

Even better would be to have the option of specifying custom sorting indicators, perhaps by adding an additional slot type to the tables.
I would really like to use the sorting indicators which are in font awesome (for which we already have a Pro license). The fa indicators are little black triangles, and they are very well known with most users, and also much easier to read than the thin arrows in a table.

Activity

  1. Hiws commented on Aug 20, 2019

    @Hiws
    Member

    You should be able to replace the default icons with font awesome ones by using CSS.

    https://codepen.io/Hiws/pen/oNvzVjK

    Quick edit: I realise this example uses an older version of font-awesome, however based on what i could read on their docs this should still be possible.

  2. tmorehouse commented on Aug 20, 2019

    @tmorehouse
    Member

    We are (hopfully) revamping the table sort icons, and switching to simple SVG images instead of entity codes, and using the SVG as a background image of the header rather than being actually inserted into the header (similar to how the validation icons are inserted into form components)

  3. tmorehouse commented on Aug 20, 2019

    @tmorehouse
    Member

    The indicators are configured in SCSS (via pseudo selectors and content: "character"). you could modify the font being used, and then update the character in the content.

  4. xaviarnl commented on Aug 20, 2019

    @xaviarnl
    Author

    You should be able to replace the default icons with font awesome ones by using CSS.

    https://codepen.io/Hiws/pen/oNvzVjK

    Quick edit: I realise this example uses an older version of font-awesome, however based on what i could read on their docs this should still be possible.

    I should have added to my original suggestion that I already went for this route. And it does indeed work, but it feels like it takes away of the idea of having a CSS framework like Bootstrap: if I go and add all kinds of CSS, why do I need the framework?

  5. xaviarnl commented on Aug 20, 2019

    @xaviarnl
    Author

    The indicators are configured in SCSS (via pseudo selectors and content: "character"). you could modify the font being used, and then update the character in the content.

    Thanks for this info. Could you please add this information to the documentation? That will make it much easier for other people who want to modify this.

  6. tmorehouse commented on Aug 20, 2019

    @tmorehouse
    Member

    Since we will be changing how the indicators are created, we will update the docs at that point to describe how they are generated.

  7. tmorehouse commented on Sep 7, 2019

    @tmorehouse
    Member

    BootstrapVue v2.0.0 stable has been released. See https://bootstrap-vue.js.org/docs/misc/changelog

  8. hobbydev71 commented on May 7, 2021

    @hobbydev71

    HI,
    So can't I use the font-awesome icon for b-table sorting icon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions