DateRangePicker
DateRangePicker copied to clipboard
send actions on user input only
This is just a suggestion pertaining the target/action mechanism, not KVO and delegates: when you change the date programmatically, do not invoke the target/action pair. That's more in line with programmatic changes to AppKit components like NSTextField
.
In my case, this does not result in fetching the initial data twice, but by default it would if you populate the view with something and then have data for the same range requested again.
I see your point; I guess I just wanted to have to handle value changes in one place only. Feel free to file a PR adding an option to not send events upon programmatic changes.
Will do! I would actually favor making this an opt-in, not sending event by default. But that'd be a breaking change, and you'd have to decide if that fits your plan. So do you want me to make it an opt-in or opt-out feature?
On 11. Nov 2019, at 14:15, Daniel Alm [email protected] wrote:
I see your point; I guess I just wanted to have to handle value changes in one place only. Feel free to file a PR adding an option to not send events upon programmatic changes.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I would suggest keeping the current behavior; for most people it probably won't make a difference anyway.