Hide (or disable) LitRenderer button

Is it possible to hide (or disable) LitRenderer cell button depending on row record content?

Yes, it should be doable. You could add a property which supplies a value to the class attribute of an element, and use CSS to hide that element, for example.

Here’s an example with CSS:
In Java

        grid.addColumn(LitRenderer.<TableData>of("<span class='${item.hiddenclass}'>foo</span><span>bar</span>")
                .withProperty("hiddenclass",
                td -> td.isHidden() ? "hiddenclass" : "")
        ).setHeader("LitRenderer");

In the global styles.css:

.hiddenclass {
    display: none;
}

Output:

Instead of hiding I would simply to render it: Playground – Lit
To disable an item you can use ?disabled=${!this.editing}
But you should also check it on the server side also for security reason

@faithful-emu , thank you for the advice! I am not very experienced in client side technologies - could you please clarify how this should look on the example below? Is it possible to disable button based on the grid item?
return LitRenderer.<LogRecord> of(""" <vaadin-button theme="tertiary-inline" @click="${viewHistory}"> \ <vaadin-icon icon="${item.historyIcon}" slot="prefix"></vaadin-icon> \ </vaadin-button> \ """) .withProperty("historyIcon", r -> r.isActive() ? "vaadin:time-backward" : "") .withFunction("viewHistory", r -> { if (r.isActive()) { filter.set(r); refreshGrid(); } })

I didn’t test it but probably this:

                    <vaadin-button ?disabled="${item.disabled}" theme="tertiary-inline" @click="${viewHistory}"> \
                        <vaadin-icon icon="${item.historyIcon}" slot="prefix"></vaadin-icon> \
                    </vaadin-button> \
                    """)
                .withProperty("disabled", r -> !r.isActive())
                .withProperty("historyIcon", r -> r.isActive() ? "vaadin:time-backward" : "")
                .withFunction("viewHistory", r -> {
                    if (r.isActive()) {
                        filter.set(r);
                        refreshGrid();
                    }
                })```