Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- Refined the official website with muted blue accents, simpler navigation, a clearer primary action, and a level SQL ribbon with vertical separators, and a grounded studio scene with brushed metal and physical reflections. Restored visible progress in the streaming comparison animation.

- The table component accepts a top-level `title`, shown in a header above the table like in the list and datagrid components. ([#1261](https://github.com/sqlpage/SQLPage/issues/1261))

- Restored parameter reuse for repeated variables on SQL Server, PostgreSQL, and SQLite, fixing SQL Server and PostgreSQL queries that repeat a variable-dependent expression in `SELECT` and `GROUP BY`.

## v0.47.0 (2026-10-15)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@ Advanced users can apply custom styles to table columns using a CSS class with t

INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'table', * FROM (VALUES
-- top level
('title', 'A title displayed above the table.', 'TEXT', TRUE, TRUE),
('sort', 'Make the columns clickable to let the user sort by the value contained in the column.', 'BOOLEAN', TRUE, TRUE),
('search', 'Add a search bar at the top of the table, letting users easily filter table rows by value.', 'BOOLEAN', TRUE, TRUE),
('initial_search_value', 'Pre-fills the search bar used to filter the table. The user will still be able to edit the value to display table rows that will initially be filtered out.', 'TEXT', TRUE, TRUE),
Expand Down
5 changes: 5 additions & 0 deletions sqlpage/templates/table.handlebars
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<div class="card my-2 {{class}}" {{#if overflow}}style="width: fit-content;"{{/if}} {{#if id}}id="{{id}}"{{/if}}>
{{#if title}}
<div class="card-header">
<h2 class="card-title">{{title}}</h2>
</div>
{{/if}}
<div class="card-body p-0" data-pre-init="table">
{{#if (or search initial_search_value)}}
<div class="p-3">
Expand Down
2 changes: 2 additions & 0 deletions tests/sql_test_files/component_rendering/table_title_1261.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
select 'table' as component, 'It works !' as title;
select 1 as x;
Loading