antd-mobile
Version:
<img src="https://gw.alipayobjects.com/mdn/rms_ee68a8/afts/img/A*hjjDS5Yy-ooAAAAAAAAAAAAAARQnAQ" alt="logo" width="100%" />
19 lines (18 loc) • 668 B
JavaScript
import { __rest } from "tslib";
import React from 'react';
import PickerView from '../picker-view';
import { useCascadePickerOptions } from '../cascade-picker/use-cascade-picker-options';
import { generateCascadePickerColumns } from '../cascade-picker/cascade-picker-utils';
export const CascadePickerView = props => {
const {
options
} = props,
pickerProps = __rest(props, ["options"]);
const {
depth,
subOptionsRecord
} = useCascadePickerOptions(options);
return React.createElement(PickerView, Object.assign({}, pickerProps, {
columns: selected => generateCascadePickerColumns(selected, options, depth, subOptionsRecord)
}));
};