Code Monkey home page Code Monkey logo

Comments (5)

github-actions avatar github-actions commented on July 4, 2024 1

⚠️ This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@woigl: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

from mui-x.

michelengelen avatar michelengelen commented on July 4, 2024

Hey @woigl ... That is because the Icon has no prop touchRippleRef and the GridActionsCell component will clone the elements with a set of predefined props:

{iconButtons.map((button, index) =>
React.cloneElement(button, {
key: index,
touchRippleRef: handleTouchRippleRef(index),
onClick: handleButtonClick(index, button.props.onClick),
tabIndex: focusedButtonIndex === index ? tabIndex : -1,
}),
)}

You can make this work without the errors if you just wrap the Icon:

const PlaceholderIcon = () => <DeleteIcon />;

from mui-x.

woigl avatar woigl commented on July 4, 2024

@michelengelen thanks, for your feedback.

Your proposal will put a delete icon instead of an empty icon as a placeholder. Can you tell me how to place an empty icon there?

from mui-x.

michelengelen avatar michelengelen commented on July 4, 2024

@michelengelen thanks, for your feedback.

Your proposal will put a delete icon instead of an empty icon as a placeholder. Can you tell me how to place an empty icon there?

Well for that you would need to add a custom icon there, or some other invisible that has the same dimensions as the icons.

const PlaceholderIcon = () => <Box sx={{ width: 30, height: 30 }} />;
Screenshot 2024-04-18 at 12 16 14

from mui-x.

woigl avatar woigl commented on July 4, 2024

@michelengelen Thanks, that solved my issue.

from mui-x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.