Skip to content

Question: update cell component to edit cell metadata #5299

Answered by captainsafia
jgwerner asked this question in General
Discussion options

You must be logged in to vote

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.

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 ma…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jgwerner
Comment options

Answer selected by jgwerner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants