Skip to content

css_container is missing from context in widgets with custom templates e.g. CheckboxMultipleSelect #117

Description

@grundleborg

I'm not sure if there's a bug here, or if I just don't fully understand what CSSContainer is / how it is supposed to work. When rendering a widget such as CheckboxMultipleSelect which has it's own custom template which does not use the tailwind_field template tag to render the field, the CSS classes are taken from the css_container object. However, this does not appear to be present in the context, so setting the default classes in CrispyTailwindFieldNode.default_styles of tailwind_field.py has no effect. I'm not sure whether I'm expecting the wrong thing to happen here, or whether these widgets with custom templates are not even expected to work yet. Any pointers would be most welcome, as I am trying to get this and a few other widgets working properly for a project, as well as sending PRs to this repo with any fixes and/or missing functionality to arise from this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions