Skip to content

BTable: Not possible to set initial sort direction of fields to descending #2775

Open
@a-kriya

Description

@a-kriya

Missing feature is from

bootstrap-vue

Docs

https://bootstrap-vue.org/docs/components/table#change-initial-sort-direction

Describe the missing feature

I'm migrating an app from BV to BVN and noticed that the fields using the sortDirection prop are not sorted according to it on first click of the column.

BVN's BTable docs mention the property under the "Field Definition Reference" section tagged not implemented (link), and also make use of it in the "Complete Example" section--where it does not work (expected).

However, the migration guide's section on BTable's Field Definitions (link) says that the sortDirection prop is deprecated:

sortKey and sortDirection are deprecated, use the table's sortBy model as documented here instead.

This does not make sense. What sortDirection was used for cannot be achieved with sortBy which maintains the initial/current sorting state of the table.

I would like a confirmation from the maintainers that it's a mistake in the migration guide before attempting an implementation of sortDirection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibility enhancementFeature missing that is in bootstrap.js v5 or bootstrap-vue v2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions