chore: message link
This commit is contained in:
@@ -304,13 +304,29 @@ const AddModal: React.FC<AddModalProps> = (props) => {
|
||||
return groupList[item.value];
|
||||
});
|
||||
|
||||
const defaultSpec =
|
||||
_.find(res.items, (item: CatalogSpec) => {
|
||||
return getDefaultQuant({
|
||||
category: _.get(current, 'categories.0', ''),
|
||||
quantOption: item.quantization
|
||||
});
|
||||
}) || _.get(res.items, `0`, {});
|
||||
const list72B = _.filter(res.items, (item: CatalogSpec) => {
|
||||
return item.size === 72;
|
||||
});
|
||||
|
||||
let defaultSpec: any = {};
|
||||
|
||||
if (list72B.length) {
|
||||
defaultSpec =
|
||||
_.find(list72B, (item: CatalogSpec) => {
|
||||
return getDefaultQuant({
|
||||
category: _.get(current, 'categories.0', ''),
|
||||
quantOption: item.quantization
|
||||
});
|
||||
}) || _.get(list72B, `0`, {});
|
||||
} else {
|
||||
defaultSpec =
|
||||
_.find(res.items, (item: CatalogSpec) => {
|
||||
return getDefaultQuant({
|
||||
category: _.get(current, 'categories.0', ''),
|
||||
quantOption: item.quantization
|
||||
});
|
||||
}) || _.get(res.items, `0`, {});
|
||||
}
|
||||
|
||||
selectSpecRef.current = defaultSpec;
|
||||
setSourceList(sources);
|
||||
|
||||
Reference in New Issue
Block a user