question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add style in a cell

See original GitHub issue

Hi,

I want to add style dynamically in a cell. for exemple valuePrepareFunction : (cell, row) => { return <span class="myclass" style="background-color: yellow !important;">${cell}</span>; }

no problem for my class but the style is ignore.

Do you know why ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
Balachandar1996commented, Feb 4, 2018

try this one, valuePrepareFunction: (data) => { return ‘<p class=“cell_right”>’ + data + ‘</p>’; },

CSS :host /deep/ .cell_right { width:100%; height: 100%; text-align: right; } thanks 😉

3reactions
WiharlleyWillcommented, Jul 24, 2020

Change the type oc collum to HTML

nameColumn: { title: "titleColumn", type: "html", valuePrepareFunction: ((data, row) => { if (row.VALUE === 'EXAMPLE') { return '<p class="cell_style">' + data + '</p>'; } else { return

${row.StatusBoleto}

; } }),

Style: :host /deep/ .cell_style { width:100%; height: 100%; text-align: right; }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apply, create, or remove a cell style in Excel for Mac
Select the cells that you want to format. On the Home tab, click Cell Styles, and then select the style that you want....
Read more >
Create a New Style in Excel - CustomGuide
1. Select the cell that has the formatting you want to use for the new style. 2. Click the Cell Styles button on...
Read more >
Cell Styles in Excel (Easy Tutorial)
1. For example, select cell B2 below. · 2. On the Home tab, in the Styles group, choose a cell style. · 3....
Read more >
Cell Styles in Excel: The Complete Guide | GoSkills
A cell style is a preset format that allows you to visually represent data with variations in color, cell borders, alignment, and number...
Read more >
How to Use and Create Cell Styles in Microsoft Excel
To view and apply a cell style, start by selecting a cell or range of cells. Go to the Home tab and click...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found