F
Filament13mo ago
Gaspar

Theme switcher do not save state in local storage

I have (default) theme light/dark/system switcher in user menu. But it does not save the state in local storage. Should it (is something wrong with my installation)?
4 Replies
Lara Zeus
Lara Zeus13mo ago
it should, sometimes the browser setting prevents that
Gaspar
GasparOP13mo ago
i use the same browser for https://filamentphp.com/docs - and it saves data to the localStorage (theme = system/light/dark). althou there is some other component used i think.. but not Filament User Theme-Switcher (in Panel) in my local site. should i debug it somehow?
Documentation - Filament
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
Gaspar
GasparOP13mo ago
Some "progress " with this problem - discovered i have some Alpine errors after upgrading Filament to v.3! It is the Filament Panel default user menu 😦
Alpine Expression Error: null is not an object (evaluating 'this.collapsedGroups.includes')
Expression: "! ($store.sidebar.groupIsCollapsed(label) && ($store.sidebar.isOpen || false))"
[Warning] Alpine Expression Error: null is not an object (evaluating 'this.collapsedGroups.includes') (livewire.js, line 1234)

Expression: "! ($store.sidebar.groupIsCollapsed(label) && ($store.sidebar.isOpen || false))"


<ul x-show="! ($store.sidebar.groupIsCollapsed(label) && ($store.sidebar.isOpen || false))" x-transition:enter="delay-100 lg:transition" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-collapse.duration.200ms class="fi-sidebar-group-items flex flex-col gap-y-1" style="height: 0px; overflow: hidden; display: none;" hidden>…</ul>

TypeError: null is not an object (evaluating 'this.collapsedGroups.includes')
Alpine Expression Error: null is not an object (evaluating 'this.collapsedGroups.includes')
Expression: "! ($store.sidebar.groupIsCollapsed(label) && ($store.sidebar.isOpen || false))"
[Warning] Alpine Expression Error: null is not an object (evaluating 'this.collapsedGroups.includes') (livewire.js, line 1234)

Expression: "! ($store.sidebar.groupIsCollapsed(label) && ($store.sidebar.isOpen || false))"


<ul x-show="! ($store.sidebar.groupIsCollapsed(label) && ($store.sidebar.isOpen || false))" x-transition:enter="delay-100 lg:transition" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-collapse.duration.200ms class="fi-sidebar-group-items flex flex-col gap-y-1" style="height: 0px; overflow: hidden; display: none;" hidden>…</ul>

TypeError: null is not an object (evaluating 'this.collapsedGroups.includes')
I guess JS problem is directly related to that Filamentphp Theme switcher logic - no records appear in localstorage! Also my Filament mobile view sidebar is not working - no menu items appear there (in desktop view they are appearing and working just fine). No idea what's wrong with it..
Lara Zeus
Lara Zeus13mo ago
try clear all the local storage data
Want results from more Discord servers?
Add your server