-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Added allowCache option #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi, it'd be awesome if you could add a test or two for when this prop is false 😄 It'd be worth noting in the README too, that setting completed=true has no effect when allowCache=false |
|
Done :) Is the test sufficient? |
|
Perfect, thanks! If you rebase on master, you'll see the This means your beforeEach() becomes simply instance = createControl({
value: '',
asyncOptions: asyncOptions,
allowCache: false
```js
instance = createControl({
value: '',
asyncOptions: asyncOptions,
allowCache: false
});( |
|
Alrights updated ;) |
|
Great - thanks for the PR @khankuan and the review @bruderstein! |
|
As I was writing up the release notes for 0.6.1, I realised that I think it's clearer if we flip this around so there's a Having an option that needs to be set to turn something off (caching) seems more intuitive if it's written in the negative, rather than having to specify a false value for a positive option. If the prop should be in the positive by default, we should name the feature (similar to I want to release a new version with the PRs that have just been merged, but will leave some time for feedback on this so we don't have to release a breaking change if there's a better option. I've committed the change to make it |
|
Ah good point ;) cacheAsyncResults sounds great. Now that you've mentioned, disableCache seems to be ambiguous as well since cache only applies to async results in this case. |
|
I'm generally against toggles named negatively, they remind me of the opt-out boxes on marketing forms ("tick here if you don't want to not receive email from us" 😄), but I see the clarity problem here. I think I'm with @khankuan on this, and cacheAsyncResults with default as true would be my vote. |
|
I thought of @bruderstein that marketing form connection is pretty funny, I may never use a negative toggle again... Just committed the change, so we now have |
|
Changes Unknown when pulling 3842f8e on khankuan:develop/cache-option into ** on JedWatson:master**. |
Closes #354