File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -733,6 +733,22 @@ query.update({ queryKey: ['bar' ]});
733733// will be removed
734734```
735735
736+ ### ` dynamicOptionsComparer ` <Badge type =" tip " >QueryFeature</Badge >
737+
738+ Allows to set custom comparer for reactions that update query options dynamically (options property)
739+
740+ Default: unset
741+
742+ Example:
743+ ``` ts
744+ const query = new Query ({
745+ dynamicOptionsComparer : () => true , // means options always equal
746+ options : () => ({
747+ enabled: false ,
748+ })
749+ })
750+ ```
751+
736752## Recommendations
737753
738754### Don't forget about ` abortSignal ` s or ` lazy ` option
Original file line number Diff line number Diff line change @@ -174,6 +174,11 @@ export interface QueryFeatures {
174174 */
175175 autoRemovePreviousQuery ?: boolean ;
176176
177+ /**
178+ * Custom comparer for dynamic options reactions
179+ *
180+ * [**Documentation**](https://js2me.github.io/mobx-tanstack-query/api/Query.html#dynamicoptionscomparer)
181+ */
177182 dynamicOptionsComparer ?: IReactionOptions < any , any > [ 'equals' ] ;
178183}
179184
You can’t perform that action at this time.
0 commit comments