Skip to content

Commit 974b57f

Browse files
committed
fix(pfFilter): do not allow empty filters
1 parent 4f9d6a6 commit 974b57f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/filters/simple-filter/filter-fields-component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ angular.module('patternfly.filters').component('pfFilterFields', {
8989
}
9090

9191
function onValueKeyPress (keyEvent) {
92-
if (keyEvent.which === 13) {
92+
if (keyEvent.which === 13 && ctrl.currentValue && ctrl.currentValue.length > 0) {
9393
ctrl.addFilterFn(ctrl.currentField, ctrl.currentValue);
9494
ctrl.currentValue = undefined;
9595
keyEvent.stopPropagation();

0 commit comments

Comments
 (0)