Skip to content

How to Enable Renaming with custom renderItem and renderItemTitle #390

Answered by lukasbach
doming-dev asked this question in Q&A
Discussion options

You must be logged in to vote

You might want to make sure to set the interactive in a tree item render method only to a button when it is not in a renaming state, if you are not already doing that. I noticed that was the issue in the docs for custom render methods, I fixed that there. If that is not working for you, please send me your implementation of your render methods, so I can see what is going wrong.

renderItem={({ title, arrow, depth, context, children }) => {
  const InteractiveComponent = context.isRenaming ? 'div' : 'button';
  return (
    <>
      <li
        {...context.itemContainerWithChildrenProps}
      >
        <InteractiveComponent
          {...context.itemContainerWithoutChildrenProps}
          {

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@doming-dev
Comment options

Answer selected by doming-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants