LeStarch / repair-cafe-app

A second revision of the repair-cafe app using Aurelia!
3 stars 0 forks source link

Prevent Tabs from Clearing When Switching Between Tabs #12

Open LeStarch opened 10 months ago

LeStarch commented 10 months ago

When switching between tabs on the complete site (https://lestarch.github.io/repair-cafe-app/#demo) the various fields will clear. Users prefer if these items do not clear. Specifically the search tabs.

Initial diagnosis: rendering of the various pages is done through the route directive. This rendering is done via the v-if, v-else-if, and v-else directives. These directives completely remove the elements. See: https://vuejs.org/guide/essentials/conditional.html#v-if-vs-v-show

We likely should switch to v-show driven elements to prevent the destruction of these components. This rendering is done here: https://github.com/LeStarch/repair-cafe-app/blob/4fbbffb44450f028339c7e3277ad4c64a605996f/src/views/app.template.js#L5-L11

LeStarch commented 10 months ago

Note: v-show does not have else and else-if varieties, so complete conditionals will be required.