Suggestion: allow the custom action icon to be a function
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 546
- PR merge metrics
- No merged PRs in 30d
Description
Amazing work !
Just a little suggestion:
_action.icon (optional if overwriting, required if custom action)_
If the icon element is a string or is null do the normal way, but if is a function use the return string as element
that way we can create custom buttons, like a color picker
I am doing this right now:
```
{
icon: '',
title: 'Change Background Color',
result: () => true
},
```
this works fine but is a nasty workaround (input inside button).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how action.icon is rendered and how custom actions are configured in the JavaScript source. Done means string and null icons retain their existing behavior, while function icons use their returned string as the element so custom actions such as a color picker no longer need the workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100