We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a82a3cd commit 5f13995Copy full SHA for 5f13995
next/components/IndividualColumnFilter.tsx
@@ -39,6 +39,14 @@ function GSettingsNumberFilter<Instance>({
39
placeholder={`Filter ${column.columnDef.header as string}...`}
40
className="w-full px-2 py-1 text-sm border border-gray-5 bg-white font-normal rounded"
41
min={0}
42
+ onKeyDown={(e) => {
43
+ // number inputs can be unintuitive when deleting the last digit. This helps with that.
44
+ if (e.key === "Backspace" && value < 10) {
45
+ e.preventDefault();
46
+ e.stopPropagation();
47
+ (e.target as HTMLInputElement).select();
48
+ }
49
+ }}
50
/>
51
);
52
}
0 commit comments