3016: prefill input search with value configured in the template
[arvados.git] / apps / workbench / app / assets / javascripts / select_modal.js
index 7c723236a0ce54ba72e27108a5fdad69eabeb441..c1267d1d3da8b5587a585ef95c662de187d33531 100644 (file)
@@ -78,6 +78,12 @@ $(document).on('click', '.selectable', function() {
                                                '=',
                                                $(this).attr('data-project-uuid')])};
     }
+    // Use current selection as dropdown button label
+    $(this).
+        closest('.dropdown-menu').
+        prev('button').
+        html($(this).text() + ' <span class="caret"></span>');
+    // Set (or unset) filter params and refresh filterable rows
     $($(this).closest('[data-filterable-target]').attr('data-filterable-target')).
         data('infinite-content-params', params).
         trigger('refresh-content');