orestbida / cookieconsent

:cookie: Simple cross-browser cookie-consent plugin written in vanilla js
https://playground.cookieconsent.orestbida.com/
MIT License
4.06k stars 416 forks source link

Make the category checked only if all the services are checked #732

Open anthony0030 opened 2 months ago

anthony0030 commented 2 months ago

I have noticed that the category gets checked even if one of the services is checked, this seems strange to me as when you toggle the category all the services get toggled.

All the tests still pass.

A different approach that I would need some help implementing: Add an option for the category logic with two options "AND" and "OR". The "AND" option would mean that all services would need to be enabled for the category to be enabled. The "OR" option would be if any service is enabled (how it currently works).

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **cookieconsent-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/orest-bidas-projects/cookieconsent-docs/36AuyS59QzPY5y7gyJiky6WDEBDp)) | [Visit Preview](https://cookieconsent-docs-git-fork-gothass-2815d9-orest-bidas-projects.vercel.app) | | Sep 12, 2024 9:38am |
netlify[bot] commented 2 months ago

Deploy Preview for cookieconsentv3-playground canceled.

Name Link
Latest commit 8e613c4ae64f86bf84449b0e9db41fd9018a3acd
Latest deploy log https://app.netlify.com/sites/cookieconsentv3-playground/deploys/66e2b68a5768ad0008b1fa0c
stale[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

theonlyriddle commented 1 month ago

Seems like something useful. The behavior of the toggle button can be misleading.