[Bug]: Category with services - 'enabled' unexpected behaviour
frankykubo opened this issue · comments
Expected Behavior
When I do not consent right away but open the setting modal instead, by default the category and all the services under it should be enabled. Thats happening.
When I click Save preferences
, then, in onConsent
function parameter (cookie), I get services
object where there are by-config-enabled services included.
Current Behavior
When I click Save preferences
in Settings modal before first consent, then, in onConsent
function parameter (cookie), I get services
object where there are NOT by-config-enabled services included.
Also, CookieConsent.acceptedService('test', 'analytics')
is false, which should be true.
Steps to reproduce
Reproduced here, by setting updating analytics category:
analytics: {
services: {
test: {
label: 'Test',
},
},
enabled: true,
},
- Click
Manage preferences in UI
- Click
Save preferences
in UI - See console, where parameter of
onConsent
is logged - Look for
services
object, where under analytics,test
should be included, but it is not.
Proposed fix or additional info.
No response
Version
3.0.0
On which browser do you see the issue?
No response