Overview
TheNumberFilter class provides a numeric input filter with optional minimum, maximum, and step constraints. Values are automatically clamped to the specified bounds.
Creating a NumberFilter
Available Methods
label
min
max
step
placeholder
key
default
initialValue
Sets an initial value that is pre-applied when the table first loads.
The initial value to apply
filter
Provides a custom query callback to override the default filter behavior.
A closure that receives
Builder $query and mixed $value and returns the modified BuildergroupClass / labelClass / inputClass
Sets CSS classes for the filter wrapper, label, or input element.
Value Clamping
TheNumberFilter automatically clamps values to stay within the min/max bounds:
150, it will be clamped to 100 before applying the filter.
If a user enters -5, it will be clamped to 1.
Default Behavior
By default,NumberFilter applies an exact match query:
Complete Examples
Basic Usage
Custom Filter Logic
Usage in Table Component
Decimal Precision
For currency or decimal values, use thestep() method: