@@ -27,13 +27,13 @@ let setFocus = (input) => {
2727 }
2828}
2929
30- function compareValue ( info , value , onChangeCompareTo , active , parentContentId ) {
30+ function compareValue ( info , value , onChangeCompareTo , onKeyDown , active , parentContentId ) {
3131 switch ( info . type ) {
3232 case null :
3333 return null ;
3434 case 'Object' :
3535 case 'String' :
36- return < input type = 'text' value = { value } onChange = { ( e ) => onChangeCompareTo ( e . target . value ) } ref = { setFocus } /> ;
36+ return < input type = 'text' value = { value } onChange = { ( e ) => onChangeCompareTo ( e . target . value ) } onKeyDown = { onKeyDown } ref = { setFocus } /> ;
3737 case 'Pointer' :
3838 return (
3939 < input
@@ -61,7 +61,9 @@ function compareValue(info, value, onChangeCompareTo, active, parentContentId) {
6161 val = parseFloat ( e . target . value ) ;
6262 }
6363 onChangeCompareTo ( val ) ;
64- } } />
64+ } }
65+ onKeyDown = { onKeyDown }
66+ />
6567 ) ;
6668 case 'Date' :
6769 return (
@@ -70,7 +72,7 @@ function compareValue(info, value, onChangeCompareTo, active, parentContentId) {
7072 className = { styles . date }
7173 value = { Parse . _decode ( 'date' , value ) }
7274 onChange = { ( value ) => onChangeCompareTo ( Parse . _encode ( value ) ) }
73- ref = { setFocus }
75+ ref = { setFocus }
7476 parentContentId = { parentContentId } />
7577 ) ;
7678 }
@@ -86,6 +88,7 @@ let FilterRow = ({
8688 onChangeField,
8789 onChangeConstraint,
8890 onChangeCompareTo,
91+ onKeyDown,
8992 onDeleteRow,
9093 active,
9194 parentContentId,
@@ -102,7 +105,7 @@ let FilterRow = ({
102105 value = { Constraints [ currentConstraint ] . name }
103106 options = { constraints . map ( ( c ) => Constraints [ c ] . name ) }
104107 onChange = { ( c ) => onChangeConstraint ( constraintLookup [ c ] , compareTo ) } />
105- { compareValue ( compareInfo , compareTo , onChangeCompareTo , active , parentContentId ) }
108+ { compareValue ( compareInfo , compareTo , onChangeCompareTo , onKeyDown , active , parentContentId ) }
106109 < button type = 'button' className = { styles . remove } onClick = { onDeleteRow } > < Icon name = 'minus-solid' width = { 14 } height = { 14 } fill = 'rgba(0,0,0,0.4)' /> </ button >
107110 </ div >
108111) ;
0 commit comments