Skip to content

Commit

Permalink
feat(jkl-table): change prop name for click a row in table
Browse files Browse the repository at this point in the history
  • Loading branch information
Saegrov committed Sep 13, 2019
1 parent 866495e commit 5dfa8c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/table-react/src/TableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface TableAnchorRowData extends BaseTableRowData {
type: "anchor";
href: string;
hrefLabel: string;
onClickRow?: (href: string) => void;
onRowClick?: (href: string) => void;
}

interface Props {
Expand All @@ -29,7 +29,7 @@ export function TableRow(props: Props) {

if (isAnchorRowData(row)) {
onClick = () => {
row.onClickRow && row.onClickRow(row.href);
row.onRowClick && row.onRowClick(row.href);
};
rowModifierClasses += "jkl-table__row--anchor-row";
}
Expand Down
8 changes: 4 additions & 4 deletions portal/src/examples/TableExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const example = `() => {
href: "https://google.com",
type: "anchor",
hrefLabel: "Google",
onClickRow: navigateToGoogle,
onRowClick: navigateToGoogle,
rowData: [
"24.02.2020",
"20-1234567",
Expand All @@ -57,7 +57,7 @@ const example = `() => {
href: "https://google.com",
type: "anchor",
hrefLabel: "Google",
onClickRow: navigateToGoogle,
onRowClick: navigateToGoogle,
rowData: [
"24.12.2020",
"20-2028732",
Expand All @@ -72,7 +72,7 @@ const example = `() => {
href: "https://google.com",
type: "anchor",
hrefLabel: "Google",
onClickRow: navigateToGoogle,
onRowClick: navigateToGoogle,
rowData: [
"13.04.2019",
"20-8382811",
Expand All @@ -87,7 +87,7 @@ const example = `() => {
href: "https://google.com",
type: "anchor",
hrefLabel: "Google",
onClickRow: navigateToGoogle,
onRowClick: navigateToGoogle,
rowData: [
"31.07.2017",
"20-1111",
Expand Down

0 comments on commit 5dfa8c9

Please sign in to comment.