Vue-storefront: eslint vue/no-use-v-if-with-v-for rule not respected

Created on 4 Jul 2019  路  7Comments  路  Source: DivanteLtd/vue-storefront

Current behavior

Currently in Product page v-if and v-for are used on the same element 4 times.

It should be avoided and eslint shows warnings.

Here the exact places:

Expected behavior

either v-if should be used in a dom element that wraps the one having v-for, or the v-for should loop on a already filtered list (could be done in a computed prop), and v-if removed

Steps to reproduce the issue

just run npm run dev

Repository

https://github.com/DivanteLtd/vue-storefront/blob/master/src/themes/default/pages/Product.vue

Important QA rejected bug

Most helpful comment

QA - after deploy there should be tested available options on product page - changing filters there. There should be visible only available options.

thanks @przspa

All 7 comments

@filrak can you please take a look at this one?

@przspa may I ask you to take care of this one please?

@pkarw sure :)

@pkarw but now @patzick working on #3217 it's not the same issues? In this case we should use computed property in this v-if.

@przspa it's not - Patryk won't be changing the UI part

QA - after deploy there should be tested available options on product page - changing filters there. There should be visible only available options.

thanks @przspa

@przspa there are visible also not available options on PDP

Was this page helpful?
0 / 5 - 0 ratings