Is there a way to make Vuetify's DataTable appear the same on both desktop and smartphone screens?

On a smartphone screen in portrait orientation, displaying a DataTable results in the original rows being separated and an imperfect appearance. However, when the smartphone is in landscape mode, the display is ideal.

I am seeking assistance with one of the following solutions: ・Maintaining the default look and feel in portrait mode. ・Resolving any issues with the landscape screen display.

The current environment utilizes vue.js without single-page components or Vue Router.

            <v-main id="main" class="blue-grey lighten-4">
                <v-container fluid fill-height>
                    <v-card>
                        <v-card-title>
                            DELE - A1
                            <v-spacer></v-spacer>
                            <v-text-field v-model="search" append-icon="mdi-magnify" label="Búsqueda" single-line
                                hide-details multi-sort show-select dense></v-text-field>
                        </v-card-title>
                        <v-data-table :headers="headers" :items="desserts" :search="search"></v-data-table>
                    </v-card>
                </v-container>
            </v-main>

        let vue = new Vue({
            el: '#app',
            vuetify: new Vuetify(),
            data: {
                search: '',
                headers: [
                    { text: 'Español', value: 'spanish', },
                    { text: 'Japonés', value: 'japanese' },
                ],
                desserts: [
                    {
                        spanish: "Español",
                        japanese: "スペイン語",
                    },
                    {
                        spanish: "Japonés",
                        japanese: "日本語",
                    },
                ],
            },
        })

view image description here

Answer №1

Absolutely! You have the option to turn off the toggle between regular and mobile views by utilizing the mobile-breakpoint attribute.

The default setting is 600, but feel free to adjust it to 0:

<v-data-table
  :headers="headers"
  :items="desserts"
  :mobile-breakpoint="0"
></v-data-table>

Give it a try on this CodePen link.

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

Delete the file containing Mongoose references

I'm facing an issue with deleting questions when a survey is deleted in the Survey model. Even after deleting the survey, the question remains intact in the database. Survey Schema: let surveyModel = mongoose.Schema( { Title: String, T ...

The Ajax page does not respond to click events when the function is declared within $(function(){ }) block

Create two functions as shown below: <script> $(function () { function myFunctionB() { alert("ddd"); } }) function myFunctionA() { alert("ddd"); } </sc ...

I am struggling to understand why clicking this button is not successfully submitting the form to Google Sheets

I am facing an issue with my Google Sheet setup that collects form data from my website. The problem is, I am unable to link the event to a button that already exists ('CompleteOrder'). Strangely, it works perfectly fine if I add a new button: & ...

Having difficulty transitioning Express Controller logic to a Service Class

Within the User Controller, there is a function that processes a GET request to /user/ and retrieves two JSON objects randomly from a MongoDB collection. Here is how the response looks like inside the controller: [{ "name": "User 1" ...

Display the first item last in an *ngFor loop in Nativescript Angular

I'm facing some confusion with the sorting of an array in JavaScript. Although the index, last, and first seem to be correct, the result is not as expected. Versions @angular/core: 4.1.0 nativescript-angular: 3.1.3 typescript: 2.4.0 Expected 1234 ...

Verifying changes using Cypress transformations

I'm brand new to using Cypress and I am currently attempting to verify that one of my elements contains a specific style. The element in question looks like this: <div class="myElement" style="transform: translate(0%, 0px); "></div> Her ...

What is the best way to figure out the resolution of a computer screen using javascript?

It came to my attention that the <canvas> element can be adjusted to have varying scales. For example, if I specify the CSS width and height as 100px but use JavaScript to set them to 200px, the element will shrink so that everything drawn on it appe ...

Is there a way to redirect using Express JS when the destination is

Hello there, I'm encountering an issue with redirecting in express js. I have a function that should trigger when a submit button is pressed and then redirect to a different page. However, when using res.redirect('/results.ejs');, I receive ...

Issue with FusionCharts rendering correctly arises when the <base> tag is present in the HTML head section

Combining AngularJS and FusionCharts in my web application has led to a unique issue. The upcoming release of AngularJS v1.3.0 will require the presence of a <base> tag in the HTML head to resolve all relative links, regardless of the app's loca ...

Showing Nested Arrays in Angular 2

If I have an array with image links as shown below, how can I display them in HTML? array = [ { img: [ {0: 'http://hairsalonfurniture.eu/wp-uploads/750x480_how-to-create-a-nice-hair-salon-s-reception-gjzd.jpg',}, {1: 'http ...

Authentication of local users with NodeJS using passportJS and MySQL

I am having trouble identifying the mistake in this code snippet: Undefined "Unknown user" passport.use(new LocalStrategy( function(username, password, done) { process.nextTick(function () { findByUsername(username, function(err, user) { ...

"Enhancing your coding skills: Implementing Typescript in your Redux

Below are the various types of action creators available: export type Calculation = { type: string; }; export type AddAndSubtract = { type: string; value: number; }; export type GetUserInput = { type: s ...

Tips for moving a div with a button in jQuery

I am working on a parent div that has an overflow set to hidden and it contains dynamically created children. I want to be able to scroll the parent div using two buttons - one for scrolling up and the other for scrolling down, as if the div had overflow-y ...

Styling Tables Dynamically With HTML, CSS, and JavaScript Based on Data

Although I've already searched for solutions, nothing seems to be working, so I'm reaching out again. My issue involves an HTML table: <table class="table1"> <tr> <th>Rank</th> <th>Na ...

Is there a way to extract data from a single line?

In my code, I have a simple object retrieved like this: getSelectedRecipients(event) { this.aliasesService.getRecipients(event.nr) .subscribe( res => { this.recipients = res; this.isVisible = true; }, err =&g ...

Dealing with undefined Ajax values in PHP

Every time I call the function, I receive an undefined value and it's baffling me as to what could be causing this issue. You are logged in as undefined, Error undefined Ajax script: function Submit() { console.log('asd') $.ajax({ ...

Stop the stream coming from getUserMedia

After successfully channeling the stream from getUserMedia to a <video> element on the HTML page, I am able to view the video in that element. However, I have encountered an issue where if I pause the video using the controls on the video element a ...

Ensure that the submit button triggers the display of results with each click

My project involves two navigation bars, each with its own table displayed upon page load. Additionally, there is a search bar used to display search results in another table. The issue I'm encountering is that when I click the submit button once, th ...

Acquiring the ID from a select element populated using axios and Vue:

Currently, I have a drop-down menu created using Vue and axios. However, I am facing an issue where I need to retrieve the ID value associated with the selected option in order to post it to another table. When I receive a response from the server, it pro ...

Align numbers vertically inside scrollbar center

I have created a program where you can input a number, and it will count from 0 to the specified number. Currently, the numbers are aligned horizontally up to 12 before starting on a new line. However, I would like the numbers to be arranged vertically fr ...