There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
refactor: remove useless params in setValue method
QiShaoXuan503752ce0085
diff --git a/libs/components/editor-core/src/block-pendant/pendant-operation-panel/hooks.ts b/libs/components/editor-core/src/block-pendant/pendant-operation-panel/hooks.tsindex 2e5e6d658f..079cb26277 100644--- a/libs/components/editor-core/src/block-pendant/pendant-operation-panel/hooks.ts+++ b/libs/components/editor-core/src/block-pendant/pendant-operation-panel/hooks.ts@@ -92,8 +92,7 @@ export const useOnCreateSure = ({ block }: { block: AsyncBlock }) => {type: newProperty.type,value: selectedId,} as SelectValue | MultiSelectValue | StatusValue,- recastBlock.id,- newProperty.id+ recastBlock.id);} else if (type === PendantTypes.Information) {const emailOptions = genOptionWithId(newPropertyItem.emailOptions);@@ -137,8 +136,7 @@ export const useOnCreateSure = ({ block }: { block: AsyncBlock }) => {}),},} as InformationValue,- recastBlock.id,- newProperty.id+ recastBlock.id);} else {// TODO: Color and background should use pendant config, but ui is not design now@@ -158,8 +156,7 @@ export const useOnCreateSure = ({ block }: { block: AsyncBlock }) => {type: newProperty.type,value: newValue,} as TextValue | DateValue,- recastBlock.id,- newProperty.id+ recastBlock.id);}};@@ -236,8 +233,7 @@ export const useOnUpdateSure = ({type: selectProperty.type,value: selectedId,} as SelectValue | MultiSelectValue | StatusValue,- recastBlock.id,- selectProperty.id+ recastBlock.id);} else if (type === PendantTypes.Information) {// const { emailOptions, phoneOptions, locationOptions } =@@ -295,8 +291,7 @@ export const useOnUpdateSure = ({}),},} as InformationValue,- recastBlock.id,- newProperty.id+ recastBlock.id);} else {await setValue(@@ -305,8 +300,7 @@ export const useOnUpdateSure = ({type: property.type,value: newValue,} as TextValue | DateValue,- recastBlock.id,- property.id+ recastBlock.id);}diff --git a/libs/components/editor-core/src/kanban/atom.ts b/libs/components/editor-core/src/kanban/atom.tsindex 1a2db8ea90..1e8b10606e 100644--- a/libs/components/editor-core/src/kanban/atom.ts+++ b/libs/components/editor-core/src/kanban/atom.ts@@ -131,8 +131,7 @@ export const moveCardToGroup = async ({type: group.type,value: group.id,},- recastBlock.id,- groupBy.id+ recastBlock.id);break;}@@ -143,8 +142,7 @@ export const moveCardToGroup = async ({type: group.type,value: group.id,},- recastBlock.id,- groupBy.id+ recastBlock.id);break;}@@ -155,8 +153,7 @@ export const moveCardToGroup = async ({type: group.type,value: [group.id],},- recastBlock.id,- groupBy.id+ recastBlock.id);break;}@@ -167,8 +164,7 @@ export const moveCardToGroup = async ({type: group.type,value: group.id,},- recastBlock.id,- groupBy.id+ recastBlock.id);break;}diff --git a/libs/components/editor-core/src/recast-block/property.ts b/libs/components/editor-core/src/recast-block/property.tsindex e6a5caa6de..a94b111900 100644--- a/libs/components/editor-core/src/recast-block/property.ts+++ b/libs/components/editor-core/src/recast-block/property.ts@@ -241,15 +241,11 @@ export const getRecastItemValue = (block: RecastItem | AsyncBlock) => {return props[id];};- const setValue = (- newValue: RecastBlockValue,- recastBlockId: string,- propertyId: RecastPropertyId- ) => {+ const setValue = (newValue: RecastBlockValue, recastBlockId: string) => {setHistory({recastBlockId: recastBlockId,blockId: block.id,- propertyId: propertyId,+ propertyId: newValue.id,});return recastItem.setProperty(TABLE_VALUES_KEY, {