Skip to content

Commit

Permalink
updated hands on table2
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Feb 9, 2024
1 parent f347cf7 commit 5c1583d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/src/components/tables/sample-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ export const SampleTable: FC<Props> = ({ data, readOnly = false, onChange, heigh
Handsontable.renderers.TextRenderer.apply(this, [instance, td, row, col, prop, value, cellProperties]);
td.innerHTML = `<div class="truncated">${value || '' }</div>`
td.addEventListener('click', function (event) {
if (event.target.classList.contains('truncated')) {
event.target.classList.toggle('expanded');
const innerDiv = td.querySelector('.truncated');
if (innerDiv && event.target === innerDiv) {
innerDiv.classList.toggle('expanded');
}
});
}}
Expand Down

0 comments on commit 5c1583d

Please sign in to comment.