Open wibed opened 2 years ago
Hello. I thought about this, but I didn't come up with a beautiful solution. I'll try to fix this.
So, I've tried using additional type for more things, like a filter. I'm enjoying the caching that's done with pagination, so if I change the search, then go back to a previous search, it already has it cached. But the component doesn't listen to anything in additional type. I tried adding it to the loadOptions, additional, and defaultAdditional, and nothing.
For example, someone can do a text search in the box and it provides results. So I create a new filter, it's a drop down that affects the results. Suppose the search is for people, then the dropdown could be male/female/either.
additional: {
page: page,
filterGender: filterGender
}
I would expect that if I change the filterGender, then the component would see additional has changed, so will either provide the cached results if they exist, or otherwise call loadOptions with that filter option as part of additional. That would make sense as a use case for additional. Actual result is nothing happens, so the only way I have to change the filter is:
@phazei
cacheUniqs={[filterGender]}
question
What is the current behavior?
Destructuring arguments which are wrapped in types allowing the object in question to be undefined results in a unreadable structure
What is the expected behavior?
id like to understand the reasoning behind wrapping a single argument inside an optional object. i have to unpack an additional object to get a single argument and destructuring as above is not possible.