nativescript-accordion
nativescript-accordion copied to clipboard
Unable to open first item by default using "selectedIndexes" with NS-Vue
Which platform(s) does your issue occur on?
- iOS simulator and device (both iPhone 6, iOS 12.2)
Please, provide the following version numbers that your issue occurs with:
- CLI: 5.4.0
- Cross-platform modules: 5.3.1
- Runtime(s): tns-ios 5.3.1
- Plugin(s):
"dependencies": {
"@vue/devtools": "5.0.5",
"axios": "^0.18.0",
"lodash": "^4.17.11",
"moment": "^2.23.0",
"nativescript-accordion": "^6.0.0-beta.2",
"nativescript-cardview": "^3.1.1",
"nativescript-email": "^1.5.3",
"nativescript-fingerprint-auth": "^6.2.0",
"nativescript-iqkeyboardmanager": "^1.4.0",
"nativescript-microsoft-appcenter": "^1.2.1",
"nativescript-orientation": "^2.2.1",
"nativescript-phone": "^1.4.0",
"nativescript-secure-storage": "^2.4.0",
"nativescript-socketio": "^3.2.1",
"nativescript-statusbar": "^5.0.0",
"nativescript-theme-core": "^1.0.4",
"nativescript-toasty": "^1.3.0",
"nativescript-ui-listview": "^6.1.0",
"nativescript-ui-sidedrawer": "^6.0.0",
"nativescript-videoplayer": "^4.2.1",
"nativescript-vue": "^2.2.0",
"nativescript-vue-devtools": "anthonny/nativescript-vue-devtools#master",
"nativescript-vue-navigator": "0.0.3",
"tns-core-modules": "^5.3.1",
"vue-i18n": "^8.5.0",
"vuex": "^3.0.1",
"vuex-pathify": "^1.2.1"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.0.0",
"@kazupon/vue-i18n-loader": "^0.3.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.2",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"clean-webpack-plugin": "^0.1.19",
"copy-webpack-plugin": "^4.5.2",
"css-loader": "^1.0.0",
"eslint": "^5.10.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-html": "^5.0.0",
"eslint-plugin-vue": "^5.0.0",
"lazy": "1.0.11",
"nativescript-dev-webpack": "^0.21.1",
"nativescript-vue-template-compiler": "^2.0.2",
"nativescript-worker-loader": "~0.9.0",
"net": "^1.0.2",
"node-sass": "^4.9.2",
"sass-loader": "^7.1.0",
"terser-webpack-plugin": "^1.1.0",
"vue-class-component": "^7.0.2",
"vue-loader": "^15.2.6",
"webpack": "^4.16.4",
"webpack-bundle-analyzer": "~2.13.1",
"webpack-cli": "^3.1.0"
}
Please, tell us how to recreate the issue in as much detail as possible.
I have attempted to reproduce an example with NativeScript Playground, but it is behaving differently than my application. My application will open the first item by default on the first mount, but if the component is destroyed and re-rendered, the item does not open again.
However, in the Playground example, the first item does not open at all by default.
Is there another way to achieve this? I am using the selectedIndexes
property and passing in [ 0 ]
to open the first item.
Is there any code involved?
Playground URL: https://play.nativescript.org/?template=play-vue&id=KkpS06&v=4