Skip to content

Issue with reflex.dev documentation: hover styling example #1162

Open
@tartansandal

Description

Path: /docs/getting-started/dashboard-tutorial

The code to set hover styling for each user row seems to be broken

def show_user(user: User):
    """Show a user in a table row."""
    return rx.table.row(
        rx.table.cell(user.name),
        rx.table.cell(user.email),
        rx.table.cell(user.gender),
        style=\{"_hover": 
            {"bg": rx.color("gray", 3)}
        },
        align="center",
    )

should be

def show_user(user: User):
    """Show a user in a table row."""
    return rx.table.row(
        rx.table.cell(user.name),
        rx.table.cell(user.email),
        rx.table.cell(user.gender),
        _hover: {"bg": rx.color("gray", 3),
        align="center",
    )

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions