Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/components/tableV2/netdataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import React, { useEffect, useMemo, useRef, useState } from "react"
import Table, { Pagination } from "./base-table"

import {
flexRender,
getCoreRowModel,
getFilteredRowModel,
getPaginationRowModel,
getSortedRowModel,
flexRender,
useReactTable,
} from "@tanstack/react-table"

Expand Down Expand Up @@ -127,6 +127,7 @@ const NetdataTable = ({

const makeColumnVisibilityAction = useMemo(
() => ({
id: "columnVisibility",
handleAction: () => setIsColumnDropdownVisible(true),
visible: enableColumnVisibility,
icon: "gear",
Expand Down Expand Up @@ -556,7 +557,7 @@ const renderActions = ({ actions, testPrefix }) => {
}

const renderBulkActions = ({ bulkActions, table, testPrefix, selectedRows }) => {
if (!bulkActions || !bulkActions.length) return <Box aria-hidden as="span" />
if (!bulkActions || !bulkActions.length) return <Box aria-hidden as="span" key="empty-box" />
return bulkActions.map(
({ id, icon, handleAction, tooltipText, alwaysEnabled, isDisabled, isVisible, ...rest }) => {
const disabled = typeof isDisabled === "function" ? isDisabled() : isDisabled
Expand Down Expand Up @@ -661,11 +662,10 @@ const renderActionWithDropdown = ({
const actionRef = useRef()

return (
<>
<React.Fragment key={id}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its safe to complete remove the Fragment here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexNti There are 2 components inside - Action and ColumnsMenu, perhaps you missed it because of how GH collapses the code?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes you correct. I missed that

<Action
ref={actionRef}
testPrefix={`-bulk${testPrefix}`}
key={id}
visible={visible}
id={id}
icon={icon}
Expand All @@ -682,7 +682,7 @@ const renderActionWithDropdown = ({
columns={table.getAllLeafColumns()}
onClose={onClose}
/>
</>
</React.Fragment>
)
}
)
Expand Down