nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
216 stars 80 forks source link

[Vue3] bottom sheet props returning undefined #448

Open dammynex opened 1 year ago

dammynex commented 1 year ago

Bottom sheet returning all passed props as undefined for vue3

vallemar commented 1 year ago

@dammynex what versión of ns-vue3 and plugin version? Can you send your package.json?

dammynex commented 1 year ago

Here is my package.json

{
  "main": "src/app.ts",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@bezlepkin/nativescript-keyboard-opening": "^1.0.1",
    "@nativescript-community/ui-image": "^4.3.11",
    "@nativescript-community/ui-lottie": "^5.0.6",
    "@nativescript-community/ui-material-bottomsheet": "^7.1.4",
    "@nativescript-community/ui-pulltorefresh": "^2.5.3",
    "@nativescript-community/ui-svg": "^0.1.11",
    "@nativescript/core": "~8.5.0",
    "@nativescript/fingerprint-auth": "^8.1.0",
    "@nativescript/iqkeyboardmanager": "^2.1.1",
    "@nstudio/nativescript-carousel": "^8.0.3",
    "@triniwiz/nativescript-toasty": "^4.1.3",
    "currency-formatter": "^1.5.9",
    "generate-unique-id": "^2.0.3",
    "nativescript-contacts-chooser": "^1.1.0",
    "nativescript-vue": "3.0.0-beta.8",
    "pinia": "^2.1.6"
  },
  "devDependencies": {
    "@nativescript/android": "8.5.1",
    "@nativescript/ios": "8.5.2",
    "@nativescript/tailwind": "^2.0.1",
    "@nativescript/types": "~8.5.0",
    "@nativescript/webpack": "~5.0.0",
    "@types/node": "~17.0.21",
    "tailwindcss": "^3.1.8",
    "typescript": "~4.9.5"
  }
}

I figured I had to do defineProps(['props']) then props.props to get the props sent from the showBottomSheet function

vallemar commented 1 year ago

@dammynex yes, this is a bug. In a few hours I will upload the fix

vallemar commented 1 year ago

@dammynex here is the fix https://github.com/nativescript-community/ui-material-components/pull/449

I imagine it will take a little while to take it to master and publish a new version.