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.

Cannot apply custom Icon

See original GitHub issue
스크린샷 2021-03-23 오전 11 27 27

(screen capture above is normal case)

스크린샷 2021-03-23 오전 11 23 36

(screen capture above is error case)

I tried to apply custom Clear icon by using ClearSelectedIcon. But it doesn’t work in my environment. Anytime I use ClearSelectedIcon, clear <button> gets empty. (like screen capture above) It would be so thankful if somebody could help me out. Here’s my code below.

  const clearBtnRenderer = () => (
    <>
      // I tried several tags(img tag, text), but nothing worked
      <svg
        width="24"
        height="24"
        fill="none"
        stroke="currentColor"
        strokeWidth="2"
        className="dropdown-search-clear-icon gray"
      >
        <line x1="16" y1="8" x2="8" y2="16"></line>
        <line x1="8" y1="8" x2="16" y2="16"></line>
      </svg>
    <>
  );

  return (
    <div className="a_search_multiselect_box">
      <MultiSelect
        options={optionList}
        value={selected}
        onChange={handleChange}
        ClearSelectedIcon={clearBtnRenderer}
      />
    </div>
  );
};

I refered to storybook below. react-multi-select Storybook : custom arrow

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
harshzalavadiyacommented, Mar 24, 2021

released v3.1.7 should fix this typecheck issue

3reactions
harshzalavadiyacommented, Mar 24, 2021

@Youn-ha

  • First approach is correct type error might be due to incorrect TypeScript interface that was defined by me, I have created a PR that should resolve this issue
  • you can use backticks with diff extension diff files will be automatically highlighted when there’s + or - as first charactor
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Change the Default Folder Icons in Windows Explorer
To do this: Right-click the folder that you want to create a shortcut to, and then click Create Shortcut.
Read more >
vscode-icons extension: Cannot use custom icon
I think it's because it can't find the image but I put the image at this file path : C:\Users<USER HERE>\AppData\Roaming\Code\User\vsicons- ...
Read more >
Suddenly unable to apply custom icon to system drive?
VolumeIcon.icns file? Currently, it is 'me'/admin, not root/admin or root/wheel. Could that be why I can't change ...
Read more >
How to Customize Any Icon in Windows 10 (or 11) - MakeUseOf
On the Processes tab, find Windows Explorer. Right-click this and choose Restart. This should apply your new icon to all folders. To remove ......
Read more >
After updating Poco launcher, can't install custom icons from ...
But after the update the icons got removed, and the option of adding icon pack is gone. Does anyone know how to apply...
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