Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report][3.2.5] DataTableHeader #17394

Closed
constantijn opened this issue May 16, 2023 · 1 comment
Closed

[Bug Report][3.2.5] DataTableHeader #17394

constantijn opened this issue May 16, 2023 · 1 comment
Labels
duplicate The issue has already been reported

Comments

@constantijn
Copy link

Environment

Vuetify Version: 3.2.5
Vue Version: 3.3.2
Browsers: Chrome 113.0.0.0
OS: Mac OS 10.15.7

Steps to reproduce

In version 3.2.5 this line of code:
import {DataTableHeader} from 'vuetify/labs/VDataTable'
gives the error:
TS2459: Module '"vuetify/labs/VDataTable"' declares 'DataTableHeader' locally, but it is not exported.
I'm forced to use that type because otherwise:
const headers = [ {title: "Name", align: "start", key: "name"} ]
trips up the linter with:
error TS2322: Type '({ title: string; align: string; key: string; } | { title: string; key: string; align?: undefined; })[]' is not assignable to type 'DataTableHeader[] | DataTableHeader[][] | undefined'.
and:
Type 'string' is not assignable to type '"start" | "end" | undefined'.

Expected Behavior

Working build

Actual Behavior

npm run build crashes with a typescript error.

Reproduction Link

https://jsfiddle.net/hxj4vst6/

Other comments

Can you please export the typescript type for DataTableHeader? IntelliJ suggests this as the fix, which alters the file downloaded from NPM, which is not exactly a real fix, but it does work.

@KaelWD
Copy link
Member

KaelWD commented May 19, 2023

Duplicate of #16680

@KaelWD KaelWD marked this as a duplicate of #16680 May 19, 2023
@KaelWD KaelWD closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2023
@KaelWD KaelWD added the duplicate The issue has already been reported label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate The issue has already been reported
Projects
None yet
Development

No branches or pull requests

2 participants