
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-antd-object-table
Advanced tools
display a list of label and value objects using descriptions component with options to make a value of copyable, multiple values as a list with a separator, copyable override at global and each item level
This is a component to display an object using antd Description component. The values get a copy icon to be able to copy the value to clipboard. Multiple values can be provided for a single lable with an optional separator.
npm install react-antd-object-table
import React from 'react'
import ObjectTable from 'react-antd-object-table'
import 'antd/dist/antd.css'
var dataObject = {
'firstName': 'First',
'lastName': 'Name',
'city': 'Some City',
'state': 'Some State',
'height': 'few ft',
'weight': 'some kgs',
}
export default class App extends React.Component {
render() {
return <ObjectTable data={[
{ label: 'First Name', value: dataObject.firstName },
{ label: 'Last Name', value: dataObject.lastName },
{ label: 'City / State', value: [dataObject.city, dataObject.state] },
{ label: 'Height / Weight', value: [dataObject.height, dataObject.weight], separator: '-' },
]} />
}
}
Disable copy icon for the whole table, but display only for a specific value
<ObjectTable copyable={false} data={[
{label: 'First Name', value: dataObject.firstName},
{label: 'Last Name', value: dataObject.lastName, copyable: true},
{label: 'City / State', value: [dataObject.city, dataObject.state]},
]}>
Enable copy icon for the whole table, but disable only for a specific value
<ObjectTable data={[
{label: 'First Name', value: dataObject.firstName},
{label: 'Last Name', value: dataObject.lastName, copyable: false},
{label: 'City / State', value: [dataObject.city, dataObject.state]},
]}>
The label and value can be ReactNodes. When ReactNodes are used as value the copy icon and copyable props are not applicable.
| Name | Description |
|---|---|
| data | List of objects with label, value, copyable and separator as the keys |
| copyable | true/false, Enable or disable copy icon for values, defaults to true |
data is a list of objects with the following keys:
| Key | Desciption |
|---|---|
| label | Label to show, string or ReactNode |
| value | string, list of strings, ReactNode or a list of ReactNodes |
| separator | If a list is provided for value, then show the separator between the values, default '/' |
| copyable | true or false, inherits the value of the component prop and can be overridden specifically for the item |
FAQs
display a list of label and value objects using descriptions component with options to make a value of copyable, multiple values as a list with a separator, copyable override at global and each item level
The npm package react-antd-object-table receives a total of 0 weekly downloads. As such, react-antd-object-table popularity was classified as not popular.
We found that react-antd-object-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.