fix: kanban and calendar block popup edit form didn't show 'Unsaved changes' warning (#6172)

This commit is contained in:
Katherine 2025-02-06 21:27:23 +08:00 committed by GitHub
parent 26e69acaf5
commit ab6b43745f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,6 +23,7 @@ export const PopupContextProvider: React.FC<{
}> = (props) => {
const { visible: visibleFromProps, setVisible: setVisibleFromProps } = props;
const [visible, setVisible] = useState(false);
const [formValueChanged, setFormValueChanged] = useState(false);
const { visible: visibleWithURL, setVisible: setVisibleWithURL } = useContext(PopupVisibleProviderContext) || {
visible: false,
setVisible: () => {},
@ -46,6 +47,8 @@ export const PopupContextProvider: React.FC<{
setVisible={_setVisible}
openMode={openMode}
openSize={openSize}
formValueChanged={formValueChanged}
setFormValueChanged={setFormValueChanged}
>
{props.children}
</ActionContextProvider>