Skip to content

Commit

Permalink
Fix entries now showing when updating empty data table
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko committed Jan 14, 2025
1 parent a22ef4d commit 63642fa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion assets/packs/data_table/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export function App({ ctx, data }) {
const columnsInitData = getColumnsData(data.content.columns);
const hasRefetch = data.features.includes("refetch");
const hasExport = data.features.includes("export");
const hasData = data.content.columns.length !== 0;
const hasSummaries = summariesItems.length > 0;
const hasSorting = data.features.includes("sorting");
const hasRelocate = data.features.includes("relocate");
Expand All @@ -124,6 +123,7 @@ export function App({ ctx, data }) {
const [rowMarkerOffset, setRowMarkerOffset] = useState(0);
const [hoverRows, setHoverRows] = useState(null);

const hasData = content.columns.length !== 0;
const totalRows = content.total_rows;
const hasEntries = hasData && totalRows > 0;

Expand Down
2 changes: 1 addition & 1 deletion assets/packs/data_table/LimitSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function LimitSelect({ limit, totalRows, onChange }) {
<div>
<form>
<label className="p-1 text-xs font-medium text-gray-500">Show</label>
<div class="relative inline-block">
<div className="relative inline-block">
<select
className="appearance-none rounded-lg border border-gray-400 bg-white px-2 py-1 pr-7 text-xs font-medium text-gray-500 focus:outline-none"
value={limit}
Expand Down
52 changes: 26 additions & 26 deletions lib/assets/data_table/build/main.js

Large diffs are not rendered by default.

0 comments on commit 63642fa

Please sign in to comment.