lovasoa / SQLpage

Fast SQL-only data application builder. Automatically build a UI on top of SQL queries.
https://sql.datapage.app
MIT License
1.49k stars 81 forks source link

link for icon table component #56

Open f8dca opened 1 year ago

f8dca commented 1 year ago

I would like to have the capability of an icon with a clickable link in table component line.

lovasoa commented 1 year ago

Hi @f8dca !

It's currently not supported directly by SQLPage's icon system, but you can get the result you want using a markdown column for the icon and the link :

select 'table' as component, 'My icon' AS markdown;

select '[
    ![](https://tabler-icons.io/static/tabler-icons/icons/accessible-off-filled.svg)
](https://google.com)' as "My icon",
    'John' as "First Name", 'Doe' as "Last Name", 1994 as "Birth Date"

image

Does that do what you need ?

f8dca commented 1 year ago

Yes, I can do this but you should aim for consistency: Other components already have the link attribute so it would make sense to add it to the table too.

f8dca commented 1 year ago

This is actually an important piece - if we can add delete / update icons to individual records than we can create basic CRUD applications. the alternative could be adding individual CRUD icons and links to each records. (Also adding colors would be nice touch)

image