The "clearable" directive should make array models empty instead of null #18035
Answered
by
stefanvanherwijnen
Dries-XQTING
asked this question in
General - Components / Directives / etc
-
As the title describes I would like the possibility of the clearable directive to take a parameter to 'clear' to. Making the model null adds a lot of unnessary null checking in my code. I can initialize inputs as empty strings and multiple select values as empty arrays. Clearing to an empty string or and empty array would make my code so much cleaner. Am I missing something? Or is this just not possible? |
Beta Was this translation helpful? Give feedback.
Answered by
stefanvanherwijnen
Jun 17, 2025
Replies: 1 comment
-
You can use
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Dries-XQTING
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
@clear
to bind a function to the clear event:E.g.