We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The ant "cascade" suports expanding the options on hover, but I don't think this is currently possible in the sac.cascade component.
ant
sac.cascade
The relevant code from ant is the expandTrigger as seen here:
expandTrigger
import React from 'react'; import type { CascaderProps } from 'antd'; import { Cascader } from 'antd'; interface Option { value: string; label: string; children?: Option[]; } const options: Option[] = [ { value: 'zhejiang', label: 'Zhejiang', children: [ { value: 'hangzhou', label: 'Hangzhou', children: [ { value: 'xihu', label: 'West Lake', }, ], }, ], }, { value: 'jiangsu', label: 'Jiangsu', children: [ { value: 'nanjing', label: 'Nanjing', children: [ { value: 'zhonghuamen', label: 'Zhong Hua Men', }, ], }, ], }, ]; const onChange: CascaderProps<Option>['onChange'] = (value) => { console.log(value); }; // Just show the latest item. const displayRender = (labels: string[]) => labels[labels.length - 1]; const App: React.FC = () => ( <Cascader options={options} expandTrigger="hover" // <---------------------- HERE displayRender={displayRender} onChange={onChange} /> ); export default App;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
ant
"cascade" suports expanding the options on hover, but I don't think this is currently possible in thesac.cascade
component.The relevant code from ant is the
expandTrigger
as seen here:The text was updated successfully, but these errors were encountered: