Skip to content

Fixes for HidingContainer to support Multi Select widgets. #6

@ghost

Description

Recommend the below changes to HidingContainer._validate() function. This will allow multi select widget support (show/ hide based on multiply selected items). This also has a fix to compare the mapping property keys with the original value rather than the validated value. The validated value has been, in many cases transformed and thus would not match up with the item in the mapping.

                    if isinstance(c, HidingComponentMixin):
            #Support Multiselect List widgets
            #Show widgets based on pre-validated value
                        if isinstance(data[c.id],list):
                            for i,item in enumerate(data[c.id]):
                                show.update(c.mapping.get(value.get(c.id)[i],[]))
                        else:
                            show.update(c.mapping.get(value.get(c.id), []))

Metadata

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