Skip to content

Commit

Permalink
work on filtering mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
barbalex committed Jan 23, 2025
1 parent cf429de commit e01fe30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/shared/FormTitle/FilterInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export const FilterInput = memo(
)
const [keyPressed, setKeyPressed] = useState(null)
const [doSet, setDoSet] = useState(false)
const [coarsePointer, setCoarsePointer] = useState(null)
const onKeyDown = useCallback(
(e) => {
// issue: (https://github.com/barbalex/apf2/issues/710)
Expand All @@ -105,6 +106,7 @@ export const FilterInput = memo(
setKeyPressed(e.key)
// on coarse pointer if enter is pressed, setNodeLabelFilter
const isCoarsePointer = matchMedia('(pointer: coarse)').matches
setCoarsePointer(isCoarsePointer)
if (!isCoarsePointer) return

// const filterValue = nodeLabelFilter?.[activeFilterTable]
Expand Down Expand Up @@ -133,7 +135,7 @@ export const FilterInput = memo(
<Container show={filterInputIsVisible.toString()}>
<StyledTextField
inputRef={inputRef}
label={`Filter (key: ${keyPressed}, value: ${value}, filter: ${filterValue}, set: ${doSet})`}
label={`Filter (coarse: ${coarsePointer},key: ${keyPressed}, value: ${value}, filter: ${filterValue}, set: ${doSet})`}
variant="standard"
fullWidth
value={value}
Expand Down

0 comments on commit e01fe30

Please sign in to comment.