({ options, values, ref, ...props }: any)
| 42 | }); |
| 43 | |
| 44 | function generateList({ options, values, ref, ...props }: any) { |
| 45 | const fieldNames = fillFieldNames(props.fieldNames || {}, false); |
| 46 | const flattenedOptions = flattenOptions(options, { |
| 47 | fieldNames, |
| 48 | childrenAsData: false, |
| 49 | }); |
| 50 | |
| 51 | return ( |
| 52 | <BaseSelectContext.Provider |
| 53 | value={{ |
| 54 | prefixCls: 'rc-select', |
| 55 | ...props, |
| 56 | }} |
| 57 | > |
| 58 | <SelectContext.Provider |
| 59 | value={{ |
| 60 | fieldNames, |
| 61 | flattenOptions: flattenedOptions, |
| 62 | options, |
| 63 | onActiveValue: () => {}, |
| 64 | onSelect: () => {}, |
| 65 | rawValues: values || new Set(), |
| 66 | virtual: true, |
| 67 | ...props, |
| 68 | }} |
| 69 | > |
| 70 | <div> |
| 71 | <OptionList ref={ref} /> |
| 72 | </div> |
| 73 | </SelectContext.Provider> |
| 74 | </BaseSelectContext.Provider> |
| 75 | ); |
| 76 | } |
| 77 | |
| 78 | describe('renders correctly', () => { |
| 79 | const sharedConfig = { |
no test coverage detected
searching dependent graphs…