{
- setSelectedVar(keyPaths as string[]);
- if (!keyPaths.length) {
- return;
- }
- const option = selectedOptions[selectedOptions.length - 1];
- if (!option?.children?.length) {
- onInsert(keyPaths);
- }
- }}
- changeOnSelect
- onClick={(e: any) => {
- if (e.detail !== 2) {
- return;
- }
- for (let n = e.target; n && n !== e.currentTarget; n = n.parentNode) {
- if (Array.from(n.classList ?? []).includes('ant-cascader-menu-item')) {
- onInsert(selectedVar);
- }
- }
- }}
- dropdownClassName={css`
- .ant-cascader-menu{
- margin-bottom: 0;
- }
- `}
- dropdownRender={(menu) => (
- <>
- {menu}
-
- {t('Double click to choose entire object')}
-
- >
- )}
- />
-