({
context,
value,
children
}: {
context: React.Context<any>;
value: any;
children: any;
})
| 847 | |
| 848 | // A Context.Provider that only sets a value if not inside SelectValue. |
| 849 | function DefaultProvider({ |
| 850 | context, |
| 851 | value, |
| 852 | children |
| 853 | }: { |
| 854 | context: React.Context<any>; |
| 855 | value: any; |
| 856 | children: any; |
| 857 | }) { |
| 858 | let inSelectValue = useContext(InsideSelectValueContext); |
| 859 | if (inSelectValue) { |
| 860 | return children; |
| 861 | } |
| 862 | |
| 863 | return <context.Provider value={value}>{children}</context.Provider>; |
| 864 | } |
| 865 | |
| 866 | export interface PickerSectionProps<T> extends Omit< |
| 867 | ListBoxSectionProps<T>, |
nothing calls this directly
no outgoing calls
no test coverage detected