diff --git a/src/Forms/IconPicker.php b/src/Forms/IconPicker.php index 06e147e..98213e8 100644 --- a/src/Forms/IconPicker.php +++ b/src/Forms/IconPicker.php @@ -219,8 +219,11 @@ public function multiple(bool|Closure $condition = true): static private function loadIcons(): Collection { + $iconsHash = md5(serialize($this->getSets())); + $key = "icon-picker.fields.{$iconsHash}.{$this->getStatePath()}"; + [$sets, $allowedIcons, $disallowedIcons] = $this->tryCache( - "icon-picker.fields.{$this->getStatePath()}", + $key, function () { $allowedIcons = $this->getAllowedIcons(); $disallowedIcons = $this->getDisallowedIcons();