Skip to content

Adding a stickyColumn causes an error. #5263

@tomomo

Description

@tomomo

Describe the bug

      TS2322: Type '{ key: string; label: string; sortable: true; stickyColumn: boolean; class: string; }' is not assignable to type 'string | ({ key: string; } & BvTableField)'.
  Object literal may only specify known properties, and 'stickyColumn' does not exist in type '{ key: string; } & BvTableField'.

Steps to reproduce the bug

<template>
  <div>
    <b-table :fields="fields" />
  </div>
</template>

<script lang="ts">
import Vue from 'vue';
import {
  BvTableFieldArray,
} from 'bootstrap-vue/esm/components/table';

type DataType = {
  fields: BvTableFieldArray
}

export default Vue.extend({
  data(): DataType {
    return {
      fields: [{ key: 'id', stickyColumn: true }]
    };
  }
});
</script>

Expected behavior

The stickyColumn described in the manual does not exist.
Is the following code missing?

// `bootstrap-vue/esm/components/table/index.d.ts`

export interface BvTableField {
  :
  stickyColumn?: boolean
}

Versions

Libraries:

  • BootstrapVue: 2.12.0
  • Bootstrap: 4.4.1
  • Vue: 2.6.11

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