Skip to content

Commit 26b4d15

Browse files
committed
Fix Filetering Select Picklist overwrite
Not able to overwrite dropdown from version 3.2, because of default here https://github.com/railsadminteam/rails_admin/blob/b09f770d9f2b743626d5f29ac9449dbcce9e5c70/src/rails_admin/filtering-select.js#L300
1 parent b09f770 commit 26b4d15

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/rails_admin/filtering-select.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,12 @@ import I18n from "./i18n";
294294
};
295295
},
296296

297-
destroy: function () {
297+
destroy: function (isDefault=true) {
298298
this.input.remove();
299299
this.button.remove();
300-
this.element.html($('<option value="" selected="selected"></option>'));
300+
if (isDefault) {
301+
this.element.html($('<option value="" selected="selected"></option>'));
302+
}
301303
this.element.show();
302304
this.filtering_select.remove();
303305
$.Widget.prototype.destroy.call(this);

0 commit comments

Comments
 (0)