-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anchor links in tables do not work with true as search
#542
Comments
This seems to be a bug in the list.js library that we use to provide the search functionality |
Here is a single page repro that illustrates the issue quite well: select 'button' as component;
select 'scroll to 256' as title, '?_=' || random() || '&search=' || COALESCE($search, 0) || '#256' as link;
select 'toggle search' as title, '?search=' || (1 - COALESCE($search, 0)) as link;
SELECT 'table' AS component, $search = '1' as search;
with recursive numbers(n) as (
select 1 union all select n + 1 from numbers where n < 500
)
SELECT n, n as _sqlpage_id FROM numbers; |
@lozdown : the bug comes from a library we use. Disabling async indexing works around the bug, but makes page loads junky with large tables. Can you try the latest commit (the easiest is to try it from docker with |
@lovasoa Much appreciate your work. I would like to try and report on the latest commit but I have no experience of docker. |
Here is a linux build of the latest version. If you are not using linux, you can wait for the next version, the fix will be in it ! |
Works perfectly and performance is excellent. Using a very simple query returning a simple table of 5 columns by 5000 rows takes approx 3 secs (of which ~140msec is database execution time) to load the page and approx 1sec to search for a row. That capability is well beyond my needs. What more can I say - Thank you |
When a table has
true as search
, loading the page with a specific anchor fails.Minimal repro:
index.sql
scroll.sql
Discussed in #538
Originally posted by lozdown August 15, 2024
Background
I populate a table component with rows from a database. Each row is identified using unique column id. Using markdown a column in each row provides a link to another sqlpage page with id as a parameter. This second page updates the database and returns back to the table. I want to return to the row used in the call identified by id. I intended to use an html anchor but I can't make it work.
There seems to be two problems
Table component definition (cut down) from member-event.sql
The update-member-event.sql file definition is
I was expecting the redirect to return a url something like member-event.sql#441963 but it actually returns verbatim (ie with no substitution of the parameter value) member-event.sql#$memberid
The text was updated successfully, but these errors were encountered: