From b666c6355224b99ec841ecd9b9ea344c91d6c48f Mon Sep 17 00:00:00 2001 From: KMinChrist <136386610+KMinChrist@users.noreply.github.com> Date: Sun, 25 Aug 2024 00:19:29 -0400 Subject: [PATCH] Reset polymorphic id upon type change (#3630) --- src/rails_admin/widgets.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rails_admin/widgets.js b/src/rails_admin/widgets.js index aabd4833d4..770d2aced8 100644 --- a/src/rails_admin/widgets.js +++ b/src/rails_admin/widgets.js @@ -258,6 +258,7 @@ import I18n from "./i18n"; "options" ); object_select.data("options", selected_data); + object_select.val(''); object_select.filteringSelect("destroy"); object_select.filteringSelect(selected_data); });