Skip to content

Commit

Permalink
skip:build chore: rename handler
Browse files Browse the repository at this point in the history
  • Loading branch information
oze4 committed Aug 1, 2021
1 parent d735ef8 commit d97e81e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions __tests__/demo/demo-components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,6 @@ export function EventTargetErrorOnRowClick(props) {
tableRef={tableRef}
columns={cols}
data={datas}
// onSelectionChange={onRowSelectionChanged}
// onRowClick={onRowClicked}
components={{
Row: (props) => {
return (
Expand Down
9 changes: 4 additions & 5 deletions src/components/m-table-body-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function MTableBodyRow(props) {
onToggleDetailPanel(path, panel);
});

const onRowClickListener = useDoubleClick(
const handleOnRowClick = useDoubleClick(
onRowClick ? (e) => onClick(e, onRowClick) : undefined,
onDoubleRowClick ? (e) => onClick(e, onDoubleRowClick) : undefined
);
Expand Down Expand Up @@ -448,7 +448,7 @@ export default function MTableBodyRow(props) {
if (persistEvents) {
event.persist();
}
onRowClickListener(event);
handleOnRowClick(event);
}}
hover={onRowClick !== null || onDoubleRowClick !== null}
style={getStyle(props.index, props.level)}
Expand Down Expand Up @@ -516,9 +516,8 @@ MTableBodyRow.defaultProps = {
index: 0,
data: {},
options: {},
path: []
/** if this is not set, it's like it ignores this prop when overriding? */
// persistEvents: true
path: [],
persistEvents: false
};

MTableBodyRow.propTypes = {
Expand Down

0 comments on commit d97e81e

Please sign in to comment.