fix: clearKeywords

This commit is contained in:
chenos 2022-11-08 22:54:34 +08:00
parent 406813e932
commit 0a90101a58
2 changed files with 3 additions and 3 deletions

View File

@ -188,7 +188,7 @@ SchemaInitializer.Item = (props: SchemaInitializerItemProps) => {
eventKey={item.key} eventKey={item.key}
key={item.key} key={item.key}
onClick={(info) => { onClick={(info) => {
item?.clearKeywords(); item?.clearKeywords?.();
onClick({ ...info, item }); onClick({ ...info, item });
}} }}
> >
@ -216,7 +216,7 @@ SchemaInitializer.Item = (props: SchemaInitializerItemProps) => {
eventKey={eventKey ? `${eventKey}-${index}` : info.key} eventKey={eventKey ? `${eventKey}-${index}` : info.key}
icon={typeof icon === 'string' ? <Icon type={icon as string} /> : icon} icon={typeof icon === 'string' ? <Icon type={icon as string} /> : icon}
onClick={(opts) => { onClick={(opts) => {
info?.clearKeywords(); info?.clearKeywords?.();
onClick({ ...opts, item: info }); onClick({ ...opts, item: info });
}} }}
> >

View File

@ -1,4 +1,4 @@
.nb-menu-item-group { .nb-menu-item-group {
max-height: 60vh; max-height: 50vh;
overflow: auto; overflow: auto;
} }