Skip to content

Wrong theme if field starts hidden #13

Description

@KRF93

Error: Field shows in incorrect theme if at any point the field is hidden and the triggered to be shown.

Expected Behaviour: If the field is hidden and in dark mode, when shown the field should use the dark mode theming

Actual Behaviour: The field shows in light mode theming colors. If the theme is manually swapped back to Light mode and then dark mode, dark mode colors return on the field

Steps to reproduce:

  1. Have a CodeField field with a hidden attribute that can be triggered to flip in some way. E.g:

CodeEditor::make('embed_snippet') ->minHeight(768) ->isReadOnly(true) ->showCopyButton(true) ->darkModeTheme('gruvbox-dark') ->lightModeTheme('basic-light') ->columnSpanFull() ->hidden(fn(Get $get) => $get('embed_snippet') == '')

  1. Trigger the condition to make the hidden condition false.

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