Tips for adjusting the height of a table in Semantic UI

Currently, I am utilizing semantic-ui-react, however, I am also willing to consider responses pertaining to semantic-ui exclusively.

The issue I am facing is with a paginated table. The last page, which may contain fewer rows, ends up having a different height compared to other pages. I need assistance in fixing the height of the table.

Below is the simple code snippet I am working with:


<Table singleLine>
    <TableHeader data={ entities } columns={ columns }/>
    <Table.Body>
      { tableBody }
    </Table.Body>
    { paginator }
  </Table>

The component TableHeader looks like this:


<Table.Header>
    <Table.Row>
      {
        _.map(columns, (column) => {
          return <Table.HeaderCell>{ column(data) }</Table.HeaderCell>;
        })
      }
    </Table.Row>
  </Table.Header>

As for tableBody, it is structured as follows:


for (let index = pageSize * pageIndex; index < Math.min(pageSize * (pageIndex + 1), entities.length); index++) {
    tableBody.push(<TableRow data={ entities[index] } rowConfig={ rowConfig }/>);
}

In addition, here is the layout for tableRow:


<Table.Row>
    {
      _.map(rowConfig, (cellConfig) => {
        return <Table.Cell>{ cellConfig(data) }</Table.Cell>;
      })
    }
  </Table.Row>

Answer №1

It seems that I get what you're facing. Have you thought about applying a CSS class with a minimum height to the component? Here's an example:

.min-height {
    min-height:397px;
}

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

Tips for swapping images as a webpage is scrolled [using HTML and JavaScript]

Hi there, I am looking to make some changes to a JavaScript code that will switch out a fixed image depending on the user's scrolling behavior. For example, when the page loads, the image should be displayed on the right side. As the user scrolls down ...

Adding additional filters to an already existing filter function while querying Azure Mobile Services

In my Angular Web App, I am utilizing the Azure Mobile Services library for JavaScript. The documentation states that there are two methods to filter returned data: passing a JSON object or using a filter function for more complex filtering. Since I need t ...

Equivalent of ResolveUrl for loading scripts without the need for server technology

I am in the process of converting an ASP.NET web page into a plain HTML web page. Most of the work is done, however, I am having trouble replacing the ASP.NET Page.ResolveUrl function when setting a reference to a javascript file: <script src="<%= ...

Using ASCII 3D text can create a stunning visual effect on a website, but it can sometimes appear

My website is displaying ASCII 3D Text with glitchy lines, but this issue is not present on other websites. Example 1: Glitchy lines visible on my website Example 2: A different website using the same text without any glitchy lines. No glitches detected h ...

A guide on integrating MongoDB, Mongoose, Express JS, and Node JS for effectively adding prices

Currently adding various documents to the database: await TestMOdel.insertMany([ { Model: "Samsung", price: 45000, OS: "MS DOS", }, { Model: "Wipro", pr ...

What are the steps to set up auto-building with create-react-app?

I've been utilizing create-react-app for some time now. Autoreloading with 'npm start' or 'yarn start' has been working well on its own, but now I'm facing another issue. Currently, I am running the app on an Express server th ...

React - utilizing dynamic properties using string values

I am facing a challenge in my test suite where I need to generate components with dynamic props. The desired components should look like this: <Button primary /> <Button secondary /> However, I am currently stuck at this point: [ &apos ...

Creating a Wireframe in Three.js Using a RawShaderMaterial with LineSegments

In the midst of my work on a project, I encountered a dilemma with rendering an intricate wireframe using THREE.LineSegments. My objective is to gradually animate the vertices within this LineSegments material (referred to as warehouse in the project), but ...

Is it possible to drag the div container in HTML to resize its width from both left to right and right to left?

After posing my initial inquiry, I have devised a resizing function that allows for the expansion of a div's width. When pulling the right edge of the div to resize its width from left to right, is it possible to adjust the direction or how to resize ...

How to arrange three buttons in a row using CSS styling

After reviewing similar issues posted by others, I have not found a solution to my problem. Despite trying the suggested solutions, I am unable to center two buttons representing different departments on my webpage. Here is my source code: <script ...

Displaying Dates in an Express Application using EJS

I have a MySQL table with a column containing date data. I am building a webpage to display this data in a more user-friendly way. Currently, the displayed result looks like this: https://i.sstatic.net/lGamr.png I would like the dates in the column to ...

Showing Variables in JavaScript

<!DOCTYPE HTML> <html> <body> <button onclick="question++">Increment</button> <script> function test() { var question = 0; } </script> </body> </html> Qu ...

The properties are not compatible with the expected types for a Next.js page

On my next.js website, I have created a page.tsx that should take in two props. Even though Visual Studio Code is not showing any errors, I encountered the following error message during the website build: Failed to compile. app/(Dashboard)/(practice)/pra ...

Troubleshooting problems with integrating Jquery Plugin in Angular for creating dynamic dropdown menus

Currently, I am utilizing the selectric jQuery plugin in conjunction with my Angular dropdown. When I have the dropdown options hardcoded in the HTML, everything functions correctly with just the following code: $('select, .select').selectric() ...

Conceal a div element after redirecting to a different HTML page

I have a dilemma with my two HTML pages - index.html and register.html. I am trying to navigate from index.html to register.html, but I want to skip the select region step and go straight to the login page. Here's the code snippet I've been attem ...

Randomly order the vertices and incident polygons for three.js fill color on a face

Recently, I delved into learning three.js and am eager to figure out how to fill in the face color after creating a polygon based on randomly given vertices. Can anyone guide me on how to achieve this? var scene = new THREE.Scene(); var camera = new THREE. ...

Utilizing AngularJS filter in JavaScript without AngularJS Framework

This is a test to experiment and learn. Currently, I have a JSON object called obj. My goal is to utilize the angular Json filter to format this JSON object and display it in the chrome console. This should be achieved without the need for any button click ...

What is causing the rejection to stay suppressed?

I noticed that when function uploadLogs() is rejected, the expected rejection bubbling up to be handled by function reject(reason) does not occur. Why is this happening? In the code below, a rejection handler for function uploadLogs() successfully handles ...

Internet Explorer has been known to remove option tags that are added dynamically through

I've come across a code snippet that works perfectly in all browsers except IE. Here it is: var array = eval( '(' + xmlHttp.responseText + ')' ); var html = ''; for(var key in array) { html += '<option value ...

Execute a function before the page reloads in ASP.NET with the help of JQuery

Is there a way to call a function before postback in Asp.Net using JQuery? ...