Skip to content

[RAC] Not possible to use "useLongPress" with Table Row - event and labelling props get filtered out. #7987

@lukpsaxo

Description

@lukpsaxo

Provide a general summary of the issue here

I am trying to use the useLongPress hook with react-aria-components Row component.

The props provided by useLongPress get filtered by filterDOMProps and are not rendered.

🤔 Expected Behavior?

event handlers and labelling like what is provided by useLongPress should work with the Row.

😯 Current Behavior

props are filtered by filterDOMProps.

💁 Possible Solution

filterDOMProps could allow labelling props so the aria-describedby is let on to the TR.

for the event handling - a propNames set can be included which allows the events required by useLongPress - onKeyDown, onClick, onDragStart, onMouseDown, onPointerDown, onPointerEnter, onPointerLeave, onPointerUp.

Please let me know if this is ok and I will make a PR.

🔦 Context

We have a requirement to allow LongPress and Press on a table row to trigger an action.

🖥️ Steps to Reproduce

N/A (Maybe this should be a feature request?)

Version

3.38.1 / 1.7.1

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Windows

🧢 Your Company/Team

Saxo Bank

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions