Skip to content

[Bug]: native-select typescript error for data-slot property #1739

@benkroeger

Description

@benkroeger

Reproduction

https://vite.new

Describe the bug

this is a pure typescript error, functionality is fine.

for repro, add native-select to your project and open components/ui/native-select/NativeSelectOptGroup.vue in your editor or run vue-tsc on the file.

You will see the following typescript error

Object literal may only specify known properties, and ''data-slot'' does not exist in type 'OptgroupHTMLAttributes & ReservedProps'.ts-plugin(2353)

Image

System Info

System:
    OS: macOS 26.3.1
    CPU: (16) arm64 Apple M3 Max
    Memory: 1.97 GB / 48.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.14.0
    npm: 11.9.0
    pnpm: 10.32.1
  Browsers:
    Chrome: 146.0.7680.165
    Firefox: 148.0.2
    Safari: 26.3.1
  npmPackages:
    @vueuse/core: catalog: => 14.2.1 
    reka-ui: catalog: => 2.9.2 
    shadcn-vue: catalog: => 2.4.3 
    vue: catalog: => 3.5.30

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions