Skip to content

Commit

Permalink
Default step of 'any'.
Browse files Browse the repository at this point in the history
  • Loading branch information
doekenorg committed Apr 11, 2024
1 parent ed3e67c commit 80f1c3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions assets/js/fe-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,9 @@ jQuery( function ( $ ) {
if ( $( this ).attr( other_type ) && '' !== $( this ).val() ) {
const value = parseFloat( $( this ).val() );

if (
'max' === current_type
&& value < parseFloat( $( this ).attr( 'min' ) )
) {
if ( 'max' === current_type && value < parseFloat( $( this ).attr( 'min' ) ) ) {
$( this ).val( $( this ).attr( 'min' ) );
} else if (
'min' === current_type
&& value > parseFloat( $( this ).attr( 'max' ) )
) {
} else if ( 'min' === current_type && value > parseFloat( $( this ).attr( 'max' ) ) ) {
$( this ).val( $( this ).attr( 'max' ) );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*/
$step = apply_filters(
'gk/gravityview/search/number_range/step',
'quantity' === $gravityview_view->search_field['type'] ? '0' : '0.01',
'quantity' === $gravityview_view->search_field['type'] ? '1' : 'any',
$gravityview_view
);
?>
Expand Down

0 comments on commit 80f1c3d

Please sign in to comment.