Guide to arranging components in two columns using VueJS Vuetify Grid

My goal is to align two components in order to display data on two columns. I followed the official Vuetify Grid tutorial, but encountered some issues with fixed row components. Despite trying to change from row to column, it still doesn't work as expected and remains on two rows.

    <v-container>
      <v-layout row>
        <v-flex xs6>Associado: {{item.nameUser}}</v-flex>
        <v-flex xs6>Associado: {{item.nameUser}}</v-flex>
      </v-layout>
    </v-container>

https://i.sstatic.net/MpX81.png

Here's the complete code:

    <template>
  <v-content class="pa-1" fluid>
    <v-btn
      color="blue"
      dark
      small
      fixed
      bottom
      right
      fab
      @click="showRegisterTransactionDialog = true"
    >
      <v-icon>mdi-plus</v-icon>
    </v-btn>

    <v-data-table
      :mobile-breakpoint="NaN"
      :headers="headers"
      :items="transactionsLocal"
      :items-per-page="3000"
      :hide-default-footer="true"
      :single-expand="singleExpand"
      :expanded.sync="expanded"
      item-key="id"
      show-expand
      sort-by="showDate"
      class="elevation-1"
    >
      <template v-slot:top>
        <v-toolbar flat color="white">
          <v-toolbar-title>Fluxo de caixa</v-toolbar-title>
          <v-divider class="mx-4" inset vertical></v-divider>
          <v-spacer></v-spacer>
        </v-toolbar>
      </template>

      <template v-slot:item.value="{ item }">
        <div style="color:green;" v-if="item.type == 'entry'">{{item.value}}</div>
        <div v-else style="color:red;">{{item.value}}</div>
      </template>

      <template v-slot:expanded-item="{ headers, item }">
        <v-container>
          <v-layout row>
            <v-flex xs6>Associado: {{item.nameUser}}</v-flex>
            <v-flex xs6>Associado: {{item.nameUser}}</v-flex>
          </v-layout>
        </v-container>
      </template>
    </v-data-table>

    <RegisterTransactionDialog
      @hideRegisterTransactionDialog="showRegisterTransactionDialog = false"
      :show="showRegisterTransactionDialog"
    ></RegisterTransactionDialog>
  </v-content>
</template>

UPDATE

I noticed that setting the background color to black on v-container was causing the issue. Now the challenge is fixing it.

<v-container style="background-color: black;">

https://i.sstatic.net/fE1EO.png

Answer №1

Have you considered utilizing a structure similar to this in place of using v-flex?

<v-col cols="12" md="6">
</v-col>

<v-col cols="12" md="6">
</v-col>

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 is the best way to display the remaining items in an array when a user clicks the next button?

Having a total of 12 cameras, I want to be able to select 4 cameras from a drop-down menu option and have only those 4 cameras displayed. Then, when I click on the next button, I need to show the remaining cameras in the selected layout format. How can thi ...

Setting the position of a tooltip relative to an element using CSS/JS

I'm struggling to make something work and would appreciate your help. I have a nested list of items that includes simple hrefs as well as links that should trigger a copy-to-clipboard function and display a success message in a span element afterwards ...

In Safari, the CSS filter value may not be applied immediately, whereas in Chrome it is

While dragging the input range, the brightness value (also a CSS property) updates but the image is not instantly affected in Safari. (It works well in Chrome) How can the changes be applied to the image while dragging? var app = Vue.createApp({ data() ...

What is the best way to transform a one-dimensional object array into a two-dimensional array in a Vue component, based on a specific key?

My vue modules are structured like this: [types.GET_PRODUCT_CATEGORIES] (state,{ stores }) { state.product_categories = {} console.log(stores); stores.forEach(message => { set(state.product_categories, message.id ...

Async/Await mishap

Could someone please explain why the code below is printing a blank result? I was expecting it to print "done" since I thought the await keyword would make the program wait for the promise to be resolved. Appreciate any help provided! let message = &apos ...

What is the process for accessing extra scope information with next-auth?

I have integrated next-auth with Discord authentication and included guilds in my scope, but I am unable to retrieve the guild data. How can this issue be resolved? const options = { providers: [ Providers.Discord({ clientId: process.env.DISC ...

Utilize a pre-defined layout in a Vue component that is sent as a property

As a complete beginner, I kindly ask for your patience as I navigate through the coding basics. I am looking to utilize a template specified in the prop. The template is located within the DOM. My intention for approaching it this way is to reuse the comp ...

What is the best way to ensure a Vue component is rendered only after a specific variable in the window object

Is there a way to delay the rendering of a component that needs to access a variable inside the window object until that variable exists? ...

What is the best way to collect and store data from various sources in an HTML interface to a Google Spreadsheet?

Currently, I have a spreadsheet with a button that is supposed to link to a function in my Google Apps Script called openInputDialog. The goal is for this button to open an HTML UI where users can input text into five fields. This input should then be adde ...

The built-in browser form validation is failing to function properly within a Vuetify v-form component

I want to utilize the default form validation of browsers for basic validations like required and email, while handling more complex validations in my service layer. However, I am having trouble implementing the required and email properties in my form. ...

Vue is refusing to display information for a certain API call

Within my next component, I have the following structure: <template> <div class="home"> <div class="container" v-if="data" > <Card v-for="result in data" :img="result.links[0]&q ...

Personalized Grid Design for Showcasing Athletic Teams

I am looking to create a custom grid layout that represents the team's Players, separated by their positions (GK, Defense, Midfielders, and Forwards), similar to the image below. The layout should also be responsive like in image 1. Currently, the re ...

Interested in learning how to filter nested tables?

After successfully integrating a filter code snippet, I encountered an issue with the filter not recognizing data tables that can only be inserted as nested tables. Due to my limited knowledge of JavaScript/CSS, I'm unsure if this problem can be resol ...

How to send a PHP variable to Ajax and execute a corresponding PHP function in response

I have a set of database records that are being displayed in separate div elements on the page. Each record corresponds to a specific ID, with its information displayed inside the div. My goal is to create a delete button for each record that would allow ...

Enhance or Delete Dynamic linked select boxes in Laravel

Here is a straightforward dynamic form where you can choose a country from the first select box and it will display all the states of that country in each row. Initially, it worked fine for the first row but when I clicked on "Add More" and selected anothe ...

I am encountering a problem with IE11 where I am unable to enter any text into my

When using Firefox, I can input text in the fields without any issues in the following code. However, this is not the case when using IE11. <li class="gridster-form" aria-labeledby="Gridster Layout Form" alt="Tile Display Input column Input Row ...

Sending a multi-dimensional array to the server using PHP via POST

Similar Question: multi-dimensional array post from form I am looking to transfer data from the client to the PHP server using jQuery's $.post() method. Once the data reaches the server, I want the $_POST['myList'] variable to be in one ...

What are the advantages of polymer's inter-component data binding?

I am working on a login component and I want to ensure that the login status is accessible by other components within my application. Is there anyone who can share some functional code snippets or examples? I require a method for binding or event handlin ...

Tips for displaying "No Results" without causing any lag in the browser

I'm encountering difficulty trying to implement a simple feature without resorting to a "messy" solution. The performance is suffering, and I am certain it's not done in a "professional" manner. What I desire is straightforward – displaying a ...

Oops! The program encountered an issue where it was unable to access the properties of an undefined variable, specifically while trying to

When creating a custom validation function in Angular, I encountered an issue where using a variable within the validation would result in an error: "ERROR TypeError: Cannot read properties of undefined (reading 'file')". This occurred when chang ...