Closed kevin-dapps closed 1 year ago
@kevin-dapps Looks great! Thanks so much for the nice and very useful PR
One thought: Is empty()
maybe a little too pervasive? Won't it evaluate to true for anything falsey (e.g. 0
and '0'
)?
Perhaps it needs to be more explicit, something like $value === null ? ...
- what do you think?
I've replicated this branch on my version of the repo and added some updates. Could you update your version of this branch to get those changes into this PR?
Thank you for all your help! I value your suggestions and feedback. I've pulled your changes in and changed the conditional to be more explicit now. 👍
This PR introduces the
DefaultValue
modifer. This allows you to set a default value for a column only if the value is empty or null without overwriting the value if it is set.See screenshots below.
Configure
Modifier
Review
![Screenshot 2023-04-21 at 14-25-01 Ampersand - Import Preview](https://user-images.githubusercontent.com/11492966/233708962-ad8f651e-7fbc-4c59-98aa-098d67a51197.png)