Hi guys,
I have a table which has a "click row" event to open a modal.
I have also some editable tags that trigger an update query, but the "click row" table event overrides it when clicking to change it. How can I make it work together?
And two more small questions:
How can I automatically set column width to wrap header content?
I saw there is an appearance settings checkbox to automatically wrap content width but it is still a lot wider then the content (I have multiple columns with a single-digit value, when clicking on the header border twice it minimizes it properly by I didn't find a way to make it happen automatically )
How can I center table values and headers contents for all columns?
"I have also some editable tags that trigger an update query, but the "click row" table event overrides it when clicking to change it. How can I make it work together?"
You cannot unless you set Row selection to Multiple and add a button outside the table to then open the modal for the one row selected.
" 1. How can I automatically set column width to wrap header content?
I saw there is an appearance settings checkbox to automatically wrap content width but it is still a lot wider then the content (I have multiple columns with a single-digit value, when clicking on the header border twice it minimizes it properly by I didn't find a way to make it happen automatically )"
Under Appearence, select Automatic Column Width:
" 1. How can I center table values and headers contents for all columns? 1. How can I center table values and headers contents for all columns?"
Select each column one by one and set the alignment (Align):
Hi Scott,
As I said for the column width wrap - I'm searching for a more "shrinked" wrapping than the automatic column width setting, because if using it as is, it takes more space than it could take by for example clicking twice on the column borders.
For the content centering question, I was searching for an robust or automatic way to do so for all columns (or to set it as a default alignment) as I have a large amount of columns.
Could you please clarify or provide further insight (an example of what you're trying to achieve would help!) into what you mean when you say "I'm searching for a more "shrinked" wrapping than the automatic column width setting, because if using it as is, it takes more space than it could take by for example clicking twice on the column borders."
For dynamic alignment of all column values, did you try using custom CSS? You can try implementing something like: ._retool-table1 { text-align: center !important; }
Here is a similar post where custom CSS was utilized to apply style changes to a table.
Potential workaround here, if you enable cell selection you can have the row selection handler run only when table.selectedCell.columnId !== 'tagColumnId'.