Skip to content

Support HTML in row expressions #2892

Description

@buremba

Feature Request

Description of Problem:

It would be great to render rows with custom HTML as a part of the expressions. Since we use web components, it's probably not easy to embed React/Vue/Angular components, but even simple HTML rendering would make the data grid much more flexible. If there is any workaround, it would be great to know!

Potential Solutions:

HTML in the expression:

{
            "plugin": "datagrid",
            "columns": [
                "Row ID",
                "Order ID",
                "Ship Mode"
            ],
            "expressions": { "ahmet": "<span class='custom-class'> \"Ship Mode\" </span>" }
        }

Or a safer approach could be using web components, potentially providing a renderer for the columns so the Persfective can pass relevant arguments to the component to render HTML inside as follows:

{
            "plugin": "datagrid",
            "columns": [
                "Row ID",
                "Order ID",
                "Ship Mode"
            ],
            "renderers": { "Ship Mode": "custom-web-component" }
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature requests or improvements

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions