What you've done looks to be right to me as long as:
Context.Provider value is defined somewhere in the top of the hierarchy and Search component should be present in the same component tree but somewhere below the Provider in the hierarchy.defaultValue and value of the Context should be same.value inside the Consumer will have allJobs structure to be consumed. I'm assuming your logic of triggerSwitch(value) takes care of that (because currently the syntax is invalid).