mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
@@ -89,6 +89,20 @@ export const InfoTable = ({
|
||||
[]
|
||||
);
|
||||
|
||||
const onPropertyInfoChange = useCallback(
|
||||
(
|
||||
property: DocCustomPropertyInfo,
|
||||
field: keyof DocCustomPropertyInfo,
|
||||
_value: string
|
||||
) => {
|
||||
track.$.docInfoPanel.property.editPropertyMeta({
|
||||
type: property.type,
|
||||
field,
|
||||
});
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<PropertyCollapsibleSection
|
||||
@@ -120,6 +134,9 @@ export const InfoTable = ({
|
||||
propertyInfo={property}
|
||||
defaultOpenEditMenu={newPropertyId === property.id}
|
||||
onChange={value => onPropertyChange(property, value)}
|
||||
onPropertyInfoChange={(...args) =>
|
||||
onPropertyInfoChange(property, ...args)
|
||||
}
|
||||
/>
|
||||
))}
|
||||
<Menu
|
||||
|
||||
@@ -23,6 +23,16 @@ const WorkspaceSettingPropertiesMain = () => {
|
||||
});
|
||||
}, []);
|
||||
|
||||
const onPropertyInfoChange = useCallback(
|
||||
(property: DocCustomPropertyInfo, field: string) => {
|
||||
track.$.settingsPanel.workspace.editPropertyMeta({
|
||||
type: property.type,
|
||||
field,
|
||||
});
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={styles.main}>
|
||||
<div className={styles.listHeader}>
|
||||
@@ -32,7 +42,7 @@ const WorkspaceSettingPropertiesMain = () => {
|
||||
</Button>
|
||||
</Menu>
|
||||
</div>
|
||||
<DocPropertyManager />
|
||||
<DocPropertyManager onPropertyInfoChange={onPropertyInfoChange} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user