The Vue 3 page does not allow scrolling unless the page is refreshed

I am encountering an issue with my vue3 web app. Whenever I attempt to navigate to a page using

<router-link to ="/Dashboard"/>

Here is the code for Dashboard.vue:

<template>
  <div class="enquiry">
    <div class="row">
      <div class="col-6" v-for="(p, index) in keyAreas" :key="index">
        <div class="card" style="margin-bottom: 10px">
          <div class="card-body">
            <h2 class="card-title">
              {{ p.number }}
              <span class="card-title" style="float: right">{{ p.title }}</span>
            </h2>
            <h5 class="card-text">
              Properties for rent
              <span class="card-title" style="float: right; margin-top: -5px">
                <Doughnut
                  :chart-data="updateChartData(p.number, totalPropertiesNumber)"
                  :width="80"
                  :height="80"
                />
              </span>
            </h5>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { ref } from "vue";
import { projectDatabase } from "../../firebase/config";
import getUser from "../../composables/getUser";
import {
  Chart as ChartJS,
  Title,
  Tooltip,
  Legend,
  ArcElement,
  CategoryScale,
} from "chart.js";

ChartJS.register(Title, Tooltip, Legend, ArcElement, CategoryScale);
export default {
  setup() {
    //to get user info e.g email and display name
    const { user } = getUser();
    const company = ref("");
    const keyAreas = ref([]);

    //all LGAs
    const allLGAs = ref([
      { title: "Abuja", number: 0 },
      { title: "Banana Island", number: 0 },
      { title: "Bluewaters Lagos", number: 0 },
      { title: "Benin City", number: 0 },
      { title: "Eko Atlantic", number: 0 },
    ]);

    //Query Function for Specific Locations
    const filterLocation = (item, query, filter) => {
      if (item[filter] === query) {
        return true;
      }
      return false;
    };

    //reference from firebase for user company
    projectDatabase
      .ref("users")
      .child(user.value.uid)
      .child("company")
      .on("value", (snapshot) => {
        company.value = snapshot.val();

        //loop through all LGAs array and update dashboard by filtering each LGA for its properties in its field
        allLGAs.value.forEach(function (p) {
          p.number = Object.keys(snapshot.val())
            .map((key) => {
              snapshot.val()[key].id = key;
              return snapshot.val()[key];
            })
            .filter((item) => {
              return filterLocation(item, p.title, "location");
            }).length;
          if (p.number > 0) {
            keyAreas.value.push(p);
          }
        });
      });

    return {
      allLGAs,
      company,
      keyAreas,
    };
  },
};
</script>

The problem arises every time I move to a new page, causing the page to freeze. I must refresh the page to visualize all items in the v-for loop. This issue impacts about three pages on the web app. Is there any solution to this problem?

Despite disabling all browser extensions and similar measures, the problem persists. Could it be due to the size of the array being loaded in the v-for?

Answer №1

The original poster was able to resolve their problem by discovering that Bootstrap v5 includes a new class called offcanvas. This class had the following CSS properties:

overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;

Enabling scrolling restored functionality to the issue.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What could be causing my inability to accurately guess people's ages?

My latest project involves developing a game where players have to guess names from images. Each game consists of 10 rounds, followed by a bonus round where participants must wager their points on guessing the age of the person in the image within a 2-year ...

The property number will have no effect on the time

Currently, I am in the process of developing an audio player that includes essential functions such as backward, play, and forward buttons. Strangely enough, the backward function operates perfectly fine, but the forward button is not functioning properly ...

When a Mui Button is clicked, it changes the color of all tabs instead of just the active

My website footer contains 5 links represented by Mui Buttons with the component set to {Link} in order to transform them into clickable links. Currently, all the buttons are black and change to green when hovered over. However, I want the button color to ...

Is there a way to simulate a minified module for testing purposes?

For my project, I developed a component intended to function as a module. The implementation involves the utilization of third-party code provided in the form of a config file (initOpinionLab.js) and a .min.js file (opinionlab.min.js). As part of the devel ...

From ascending to descending: enhancing input search functionality with Vuejs

I need assistance with changing the sorting order of the result displayed in this field from descending to ascending. <!-- city --> <div class="col-md-6"> <label class="form-label fw-bold w-100">{{ $t(&ap ...

Here's a unique rewrite: "Learn how to manipulate the CSS class of a textarea element (specifically in NicEdit) by utilizing the addClass

I am currently validating a textarea using the NicEdit plugin. var getContent = nicEditors.findEditor("SubSliderDescription").getContent(); bValid = bValid && checkBlankTextArea(getContent, "SubSliderDescription") function checkBlankTextArea(o, ...

How can I retrieve the locale for dateTimeLocalization in Vue i18n?

Currently, I am using a tutorial on implementing i18n in my vue code. It is working well with just one inconvenience - the language is hard-coded. Here is how my Localization file looks: export default: { 'fr-fr': { ... }, &ap ...

How to specify columns when storing data in a CSV file using Scrapy

As I scrape data from the web, I am facing an issue with my csv file where the links column is always displayed as the first column. How can I specify the placement of columns in the csv file? pName = response.css('#search .a-size-medium') ...

Is there a way to reverse the hover effect on div elements?

Let's start by examining the code I've written: HTML: <div class="button_container"> <div class="inner_button"> <a href="#" class="button_text">Button</a> </div> <div class="button_side"> ...

Stopping an endless loop in JavaScript by pressing a key on the keyboard can be a useful

I've been working on creating a JavaScript game and am currently tackling the challenge of implementing gravity. One crucial aspect I need to address is creating an infinite loop without causing the browser to crash. Is there a way for me to include a ...

Is there a way to extract the user ID from the token in the backend using Vue-Auth?

For my project, I am using vue-auth for authentication. In the frontend, I am able to access the necessary information by using code like this: this.$auth.user().id The headers are functioning perfectly as they should, sending the token that can be retrie ...

Unique custom CSS and meta tag options for enhancing iPad/iPhone user experience

Currently, I am developing a web application that integrates Extjs components, PHP, and MySQL. My main goal is to ensure that my application looks correct on the iPad. Are there any specific CSS rules or meta tags that I should be implementing for optima ...

Design adaptable HTML backgrounds

Hello, I am working on a webpage that uses two background images. Here is the CSS I'm using: body{ background: url('<?=base_url();?>/assets/header_bg.png') no-repeat, url('& ...

Styling your Vuetify V-data-table with CSS

Struggling to add extra spacing between table rows, despite inspecting the page and verifying that my styles are not being overridden. Have read other Vuetify posts on applying CSS but still no luck. Any suggestions for why I can't style my table as d ...

Is it possible to use CSS transitions to animate an absolute positioned element?

I am having trouble getting a CSS transition to work for animating an element's position change. I have tried using the all properties in the transition declaration like in this example: http://jsfiddle.net/yFy5n/3/ However, my goal is to only apply ...

Leveraging CSS keyframes to create dynamic animations

I am facing an issue with CSS while designing my website. I reached out to the plugin developer for help through a ticket submission, but unfortunately, I have not received a response yet. On my homepage at , I have utilized CSS keyframes to create a text ...

Node.js has no trouble loading HTML files, however, it seems to encounter issues when trying to

Having a bit of trouble with my JavaScript skills as I try to load my index.html file (seems like it should be the 5th easiest thing to do in JavaScript). Let me get straight to the point; when I manually open my index.html, it loads perfectly WITH the CS ...

Angular controller utilizing the `focusin` and `focusout` events from jQuery

Can anyone help me figure out why this piece of code is generating syntax errors in my AngularJS controller? $(".editRecur").focusin(function() { $(.recurBox).addClass("focus"); }).focusout(function() { $(.recurBox).removeClass("focus"); }); ...

Timing issue with the animation callback

I have been experimenting with creating a bounce effect on my custom scroller by utilizing the translate3d method for scrolling. I managed to successfully implement it, but now I am facing an issue where if you continuously scroll out of bounds (try double ...

Concealing an input field in AngularJS

I am currently developing a login page with register and login options using AngularJS. The interface includes three input fields: username, password, and name. I aim to display the name field upon clicking the register button and hide it upon clicking t ...