Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeTable: Row hover event #4502

Closed
AfikGrinstein opened this issue Jun 12, 2023 · 1 comment · Fixed by #4508
Closed

TreeTable: Row hover event #4502

AfikGrinstein opened this issue Jun 12, 2023 · 1 comment · Fixed by #4508
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@AfikGrinstein
Copy link
Contributor

AfikGrinstein commented Jun 12, 2023

Describe the feature you would like to see added

I want to be able to react to on hover event for each row in the table.
In our case, we want to display the action menu (right cell) only when the user hovers the row.
You can this template example https://primereact.org/treetable/#template.

Is your feature request related to a problem?

No

Describe the solution you'd like

component should have a onHover property which is triggered when a hover event occur on a row with the relevant row properties
Same as DataTable with onRowMouseEnter/onRowMouseLeave callback

Describe alternatives you have considered

No response

Additional context

No response

@AfikGrinstein AfikGrinstein added Status: Discussion Issue or pull request needs to be discussed by Core Team Type: New Feature Issue contains a new feature or new component request labels Jun 12, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 12, 2023
@melloware
Copy link
Member

Should be similar to Datatable's onRowMouseEnter and onRowMouseLeave

    /**
     * Callback to invoke when a row is hovered with mouse.
     * @param {DataTableRowMouseEvent} event - Custom row mouse event.
     */
    onRowMouseEnter?(event: DataTableRowMouseEvent): void;
    /**
     * Callback to invoke when a row is navigated away from with mouse.
     * @param {DataTableRowMouseEvent} event - Custom row mouse event.
     */
    onRowMouseLeave?(event: DataTableRowMouseEvent): void;

@melloware melloware added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Type: New Feature Issue contains a new feature or new component request Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jun 12, 2023
@melloware melloware added this to the 9.6.0 milestone Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants