How to correctly typehint or set return types for IDE support and autocomplete?
Hi guys, I create small macro for all fields and entries:
But I still have these warnings:
Method 'hintIcon' not found in FilamentServiceProvider|\Filament\Support\Components\ViewComponent
Method 'warningHint' not found in \Filament\Forms\Components\Toggle
3 Replies
Try this
because ViewComponent does not have the method hintIcon hintColour hintIconTooltip. You should check whether these methods are available in your target Component, if not it will not work there.
Yeah, I know, but there is too many components that I want to use this. For example TextEntry, TextInput, Select, Toggle, Textarea, TextRich etc. I dont want to duplicate it.
Then u should check before with method_exists