evidence icon indicating copy to clipboard operation
evidence copied to clipboard

[Bug]: Duplicate query string added when using LinkColumn and Datatable link property together

Open timothyhoward opened this issue 1 year ago • 2 comments

Describe the bug

I've just updated to the latest version of Evidence after the cache/bandwidth issue was rectified and I've found an issue where if a user has specified both a row-level link (using the 'link' property in the Datatable parameters) and a column-level link (using the contentType='link' property in the Datatable Column parameters), two query strings will be added to the URL resulting in a 404. Previously if this was the case, both of the links would work correctly without duplicating the query string.

Steps to Reproduce

  1. Add a row-level link (using 'link' property in Datatable) and a column-level link (using 'contentType='link'').
  2. Click on the row and two query strings will be added to the URL (although the URL will show up normally when you hover over it before clicking).
  3. User will be greeted with a page not found message.

Logs

No response

System Info

System:
    OS: Windows 10 10.0.20348
    CPU: (8) x64 Intel(R) Xeon(R) Gold 6226R CPU @ 2.90GHz
    Memory: 14.82 GB / 32.00 GB
  Binaries:
    Node: 20.18.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.6.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (119.0.2151.97)
  npmPackages:
    @evidence-dev/core-components: ^4.8.8 => 4.8.8
    @evidence-dev/csv: ^1.0.12 => 1.0.12
    @evidence-dev/duckdb: ^1.0.11 => 1.0.11
    @evidence-dev/evidence: ^39.1.12 => 39.1.12
    @evidence-dev/mssql: ^1.0.10 => 1.0.10
    @evidence-dev/sqlite: ^2.0.6 => 2.0.6
    @timhoward/evidence-connector-mssql: 1.0.1 => 1.0.1

Severity

annoyance

Additional Information, or Workarounds

I've worked around it for now by removing the column-level link, although this results in cosmetic issues as users do not realise the row is a link because the link text is now plain.

timothyhoward avatar Oct 21 '24 23:10 timothyhoward

datatable_error_2 datatable_error_3

timothyhoward avatar Oct 21 '24 23:10 timothyhoward

Do you have a code repro for this?

archiewood avatar Jan 10 '25 17:01 archiewood