forked from pkp/ui-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I10969 (pkp#542) Adjustment to address various issues after dependenc…
…y update * pkp/pkp-lib#10969 Fix reactivity madness * pkp/pkp-lib#10969 Address breaking change in vue3, where inject in pinia stores does not provide current component provides * pkp/pkp-lib#10969 Defeated another infinite loop * pkp/pkp-lib#10969 Back to have toolbar dynamic based on attachers * pkp/pkp-lib#10969 Refined
- Loading branch information
1 parent
94fc221
commit 13d565f
Showing
8 changed files
with
79 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
import {inject, onUnmounted} from 'vue'; | ||
import {onUnmounted} from 'vue'; | ||
import {injectFromCurrentInstance} from '@/utils/defineComponentStore'; | ||
|
||
export function useDataChanged(callback) { | ||
if (callback) { | ||
const registerDataChangeCallback = inject('registerDataChangeCallback'); | ||
const registerDataChangeCallback = injectFromCurrentInstance( | ||
'registerDataChangeCallback', | ||
); | ||
registerDataChangeCallback(callback); | ||
|
||
const unRegisterDataChangeCallback = inject('unRegisterDataChangeCallback'); | ||
const unRegisterDataChangeCallback = injectFromCurrentInstance( | ||
'unRegisterDataChangeCallback', | ||
); | ||
|
||
onUnmounted(() => { | ||
unRegisterDataChangeCallback(callback); | ||
}); | ||
} | ||
|
||
const triggerDataChange = inject('triggerDataChange'); | ||
const triggerDataChange = injectFromCurrentInstance('triggerDataChange'); | ||
|
||
return {triggerDataChange}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
src/managers/ReviewerManager/modals/workflowLogResponseModalStore.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters