Skip to content
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

Reuse existing table cell rendering logic, so render_cell() hook works #17

Open
simonw opened this issue Jan 25, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Jan 25, 2023

This plugin currently implements its own custom version of a table display:

var ths = safe(columns.map(c => autoescape`<th>${c}</th>`).join(""));
var tr_rows = safe(rows.map(row => autoescape`<tr>${safe(columns.map(column => autoescape`<td>${displayCell(row[column])}</td>`).join(""))}</tr>`).join(""));

This means things like the render_cell() plugin hook are not respected.

@simonw simonw added the enhancement New feature or request label Jan 25, 2023
@simonw
Copy link
Owner Author

simonw commented Jan 25, 2023

Fixing this may require support from Datasette itself - maybe in the form of an API mechanism for fetching back just the table itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant