lusaxweb / vuesax

New Framework Components for Vue.js 2
https://lusaxweb.github.io/vuesax/
MIT License
5.63k stars 744 forks source link

vs-tab with vee-validate #963

Open jakimoff opened 3 years ago

jakimoff commented 3 years ago

`

{{ $t('text.save') }} ` this.$validator.validateAll().then() returns true if we did not go to the 2nd tab. That is, when the first tab field is valid, the next tab is not checked. Here the bug example https://codesandbox.io/s/vs-tabbug-0osry
jakimoff commented 3 years ago

here vuesax/src/components/vsTabs/vsTab.vue:4 need change v-if to v-show

in vuesax.common.js my code node_modules/vuesax/dist/vuesax.common.js

var vsTabvue_type_template_id_68182bc2_lang_html_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":_vm.invert?_vm.vertical?'fade-tab-vertical-invert':'fade-tab-invert':_vm.vertical?'fade-tab-vertical':'fade-tab'}},[_c('div',{ staticClass:"con-tab vs-tabs--content", directives:[{ name:"show", rawName:"v-show", value:(!_vm.active), expression:"!active" }] },[_vm._t("default")],2)])}

I change [(_vm.active)?_c('div',{staticClass:"con-tab vs-tabs--content"},[_vm._t("default")],2):_vm._e()] to [_c('div',{ staticClass:"con-tab vs-tabs--content", directives:[{ name:"show", rawName:"v-show", value:(!_vm.active), expression:"!active" }] },[_vm._t("default")],2)]

Please add parameter for change v-if to v-show because vee-validate don't check hidden tabs