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

QSlider markerLabels property (SliderMarkerLabels) can be Array<number|string> but not typed (TypeScript) nor documented #17450

Closed
lugrinder opened this issue Aug 21, 2024 · 2 comments · Fixed by #17555
Assignees
Labels
area/components area/typescript bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@lugrinder
Copy link

What happened?

If you use an array of numbers for markerLabels of QSlider works fine, but shows type error (vue-tsc) because SliderMarkerLabels has no definition to use Array<number|string>.

What did you expect to happen?

It works, but I really don't know if this will be expected (not documented). As it works and is a valid and useful alternative (model is array index, label is array data), simply add to type (for TypeScript) and document.

Reproduction URL

https://github.com/lugrinder/quasar

How to reproduce?

Open project in an editor with Volar, or check using vue-tsc.

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Components (quasar), TypeScript Support

Platforms/Browsers

No response

Quasar info output

Operating System - Windows_NT(10.0.19045) - win32/x64
NodeJs - 20.13.1

Global packages
  NPM - 10.8.2
  yarn - Not installed
  @quasar/cli - 2.4.1
  @quasar/icongenie - 4.0.0
  cordova - Not installed

Important local packages
  quasar - 2.16.9 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time        
  @quasar/app-vite - 1.9.5 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.12 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.4.38 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.4.3
  pinia - 2.2.2 -- Intuitive, type safe and flexible Store for Vue
  vuex - Not installed
  vite - 2.9.18 -- Native-ESM powered web dev build tool
  eslint - 8.57.0 -- An AST-based pattern checker for JavaScript.
  electron - Not installed
  electron-packager - Not installed
  @electron/packager - Not installed
  electron-builder - Not installed
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Relevant log output

No response

Additional context

No response

@lugrinder lugrinder added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Aug 21, 2024
@github-actions github-actions bot added area/components area/typescript bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite labels Aug 21, 2024
@rstoenescu
Copy link
Member

@yusufkandemir can u take a look at this one, pls?

@yusufkandemir
Copy link
Member

Thanks for reporting! The fix will be included in quasar v2.17.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/components area/typescript bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants