Closed buddhaCode closed 2 months ago
I have the same requirements and about to create a PR for it. Thank you @buddhaCode for the PR +1
Small suggestion though, for me the function name icon()
looks cleaner and readable than the name clearIcon()
. Since we have only one icon for the widget I think it's safe to name the function as icon()
. So we will have same naming like filament.
@AjithLalps That sounds reasonable. I was checking if the picker component already inherits an icon()
method from somewhere. That's not the case.
But after thinking about it, I found out that this Picker component uses the HasAffixes
trait and simply uses the suffixIcon()
method. So introducing a clearIcon()
, as proposed in this PR, is more or less redundant.
I would suggest the following changes to this PR:
clearIcon()
from the DateRangePicker
clearIcon()
to suffixIcon()
on the DateRangeFilter
@AjithLalps and @malzariey What do you think about that?
Agreed+1
Hmm it wasn't that easy. When the button is deactivated is just the suffix icon. But when it's active is a suffix action which an icon.
So basically I left every thing as it was and just changed clearIcon
to icon
:)
Thank you @malzariey for merging the PR and thank you @buddhaCode for the PR.
@AjithLalps It was a pleasure. Thanks for your feedback.
Thanks !
I would like to change the clear button's icon. So I introduced a
clearIcon()
method.