From e66abf7133c8bab054808dcfb0e2a8a5ef312784 Mon Sep 17 00:00:00 2001 From: Tomoki Nishikawa <43395303+nissinbo@users.noreply.github.com> Date: Mon, 23 Feb 2026 06:32:43 +0000 Subject: [PATCH] Fix attribute when converting factors in ChoicesFilterState --- R/FilterStateChoices.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/FilterStateChoices.R b/R/FilterStateChoices.R index 450414fb5..d8ca3f9a4 100644 --- a/R/FilterStateChoices.R +++ b/R/FilterStateChoices.R @@ -158,7 +158,9 @@ ChoicesFilterState <- R6::R6Class( # nolint combine = "or" ) if (is.factor(x)) { + x_attributes <- attributes(x) x <- droplevels(x) + attributes(x) <- x_attributes } super$initialize( x = x,