From 107cbe496f14f723caeb796da1fbc64f906486a2 Mon Sep 17 00:00:00 2001 From: Jordan Baird Date: Thu, 14 Dec 2023 19:55:21 -0700 Subject: [PATCH] Update ColorWellRepresentable.swift --- .../ColorWellKit/Views/SwiftUI/ColorWellRepresentable.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/ColorWellKit/Views/SwiftUI/ColorWellRepresentable.swift b/Sources/ColorWellKit/Views/SwiftUI/ColorWellRepresentable.swift index 994976a..63d7d8d 100644 --- a/Sources/ColorWellKit/Views/SwiftUI/ColorWellRepresentable.swift +++ b/Sources/ColorWellKit/Views/SwiftUI/ColorWellRepresentable.swift @@ -180,6 +180,12 @@ struct ColorWellRepresentable: NSViewRepresentable { if colorWell.style != context.environment.colorWellStyleConfiguration.style { colorWell.style = context.environment.colorWellStyleConfiguration.style } + if + let swatchColors = context.environment.colorWellSwatchColors, + colorWell.swatchColors != swatchColors + { + colorWell.swatchColors = swatchColors + } } func makeCoordinator() -> Coordinator {