Question: update cell component to edit cell metadata #5299
-
In your opinion, what would be the best way to update the existing nteract cell component or to create a new component that allows the user to update the cell's metadata (afaik such a component doesn't exist, let's call it For example, consider the cell metadata below, where
With a hypothetical cell metadata component (let's call it It seems that the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We don't have a React component that presents a UI for updating the cell's metadata. You can update the metadata of the cell in the notebook using the It's definitely possible to implement a React component that displays a UI and interacts with the interface ComponentProps {
contentRef: ContentRef;
id: CellId;
}
class CellMetadata extends React.Component {
render() {
return <input className="cell-metadata" />;
}
}
const mapStateToProps = () => {
// Get metadata of CellId here
}
const mapDispatchToProps = () => ({
setInCell: () => {}
});
export connect(mapStateToProps, mapDispatchToProps)(CellMetadata) |
Beta Was this translation helpful? Give feedback.
We don't have a React component that presents a UI for updating the cell's metadata. You can update the metadata of the cell in the notebook using the
SetInCell
action as done here.It's definitely possible to implement a React component that displays a UI and interacts with the
SetInCell
action to update the cells metadata. It should be a new component in the stateful-components package with a profile that looks roughly like this.