Open sylvainlg opened 1 year ago
Hello Sylvain,
I'll take a look.
After some research, I think the error is fire in Modal
component :
Error :
Uncaught TypeError: a is not a function
at index.min.cjs.js:1:1
Cause, hide
not defined :
const handleAnimatedUnmount = () => {
handleModal(false);
setTimeout(() => {
if (focusBackTo) focusBackTo.focus();
hide();
}, MODAL_ANIMATION_TIME);
};
minified as :
z=()=>{_(!1),setTimeout((()=>{p&&p.focus(),a()}),300)}
The root cause can be in the ConsentModal
component, the close function is not set.
In ConsentManager
, the fix can be :
replace
setIsOpen={openConsentModal}
by
close={() => setIsModalOpen(false)}
but the bug still seems to be present in some cases, I don't understand what's going on
Up @desoindx
Hi @desoindx Do you think you will have some time to look into this problem? Thank you
Hi
I work on ConsentModal / ConsentService but i can't figure it out how to update all optional consents more than once. The first toggle works well but the following don't do anything (
internalConsents
is correctly updated). I think the issue may come fromRadioGroup
but i can't testMy code:
I have a function
acceptDeclineAll
which allows to modify the internal state (internalConsents
) of all the optional consents.consents
: consents saved in cookieinternalConsents
: current state of consents in the modal form not saved yet (init : copy of consents)I got an error on the second state change on a radio button :