mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 14:35:23 +02:00
feat: allow applying filters with Enter key
This commit is contained in:
@@ -245,9 +245,11 @@ export function ColumnFilterPopover({
|
||||
value={search}
|
||||
onChange={e => setSearch(e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' && search) {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
onSelectAll(filteredValues);
|
||||
if (search) {
|
||||
onSelectAll(filteredValues);
|
||||
}
|
||||
onClose();
|
||||
}
|
||||
}}
|
||||
@@ -371,7 +373,7 @@ export function ColumnFilterPopover({
|
||||
value={condition.value}
|
||||
onChange={e => setCondition({ ...condition, value: e.target.value })}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' && condition.value) {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
applyCondition();
|
||||
}
|
||||
@@ -389,7 +391,7 @@ export function ColumnFilterPopover({
|
||||
value={condition.value2 || ''}
|
||||
onChange={e => setCondition({ ...condition, value2: e.target.value })}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' && condition.value && condition.value2) {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
applyCondition();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user