question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chip deleteIconStyle throws arrow

See original GitHub issue

I wanted to change the delete icon size, so I’ve tried applying the deleteIconStyle property.

   <Chip
          key={this.props.filterItem.key}
          onRequestDelete={() => this.props.handleFilterItemRequestDelete(this.props.filterItem.key)}
          onTouchTap={this.handleTouchTap(this.props.filterItem)}
          className={`filter-element ${this.state.showFilterItem ? 'opened-filter' : ''}`}
          backgroundColor="#fff"
          deleteIconStyle={{ width: 5, height: 5, fontSize: 5 }}
        >
          {this.props.filterItem.label}{this.assembleTheSelectedValues(this.state.selectedValues)}
   </Chip>

Throws Warning: Unknown prop 'deleteIconStyle' on <div> tag. Remove this prop from the element.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Sep 27, 2018

@kimfucious Yes, your code snippet is exactly how I would have solved the problem. Well done 👍 .

1reaction
kimfuciouscommented, Sep 27, 2018

HI @oliviertassinari , just a follow up on this, as it took me a while to wrap my head around how to do overrides.

I eventually was able to change the size of the deleteIcon by creating a styled version of Chip using withStyles:

const StyledChip = withStyles({
  root: {
    marginTop: 0,
    marginBottom: 0
  },
  deleteIcon: {
    height: 16,
    width: 16,
    fontSize: 16
  }
})(Chip);

I still don’t fully get it, so if there are better ways to do this, I’d be appreciative of any feedback.

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chip deleteIconStyle throws arrow · Issue #7414 · mui/material ...
I wanted to change the delete icon size, so I've tried applying the deleteIconStyle property. this.props.handleFilterItemRequestDelete(this.props.
Read more >
Overriding MUI Chip deleteIcon color - Stack Overflow
I am trying to give custom color to deleteIcon of Chip component (MUI v5). As I can see, my styles are overridden by ......
Read more >
Bootstrap Icons - examples & tutorial
Huge collection of over 1500+ responsive icons for Bootstrap 5. A library of well organized and easy to use icons which allow you...
Read more >
Card-mod - Add css styles to any lovelace card
Find a code for rotating an icon inside Entities card. ... (but throws the warning 'mod-card should NEVER be used with a card...
Read more >
The Toolbar - Metro Retro
You can undo this by either deleting the voting round, or having the person press the undo button (Ctrl +z). Marker pen.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found