Fix an issue where some checkboxes didn't update
This commit is contained in:
parent
36bbc713ac
commit
71e190f944
@ -1,3 +1,4 @@
|
||||
import { useState } from 'react';
|
||||
import { getMemory } from '../../memory';
|
||||
import { RequestCluster } from '../../request-cluster';
|
||||
|
||||
@ -20,6 +21,7 @@ export function StolenData({
|
||||
cookiesOrOriginOnly: boolean;
|
||||
detailsVisibility: boolean;
|
||||
}) {
|
||||
const [changesCount, setChangesCount] = useState(0);
|
||||
if (!origin) {
|
||||
return (
|
||||
<div className="stolen-data-container">
|
||||
@ -34,12 +36,15 @@ export function StolenData({
|
||||
(cluster) => !cookiesOrOriginOnly || cluster.hasCookies() || cluster.exposesOrigin()
|
||||
);
|
||||
return (
|
||||
<div className="stolen-data-container">
|
||||
<div className={['stolen-data-container', `data-changes-count-${changesCount}`].join(' ')}>
|
||||
<span>Domeny{detailsVisibility ? ' oraz przesłane informacje' : null}</span>
|
||||
<br />
|
||||
<button
|
||||
onClick={() => {
|
||||
clusters.forEach((cluster) => cluster.undoMark());
|
||||
clusters.forEach((cluster) => {
|
||||
cluster.undoMark();
|
||||
});
|
||||
setChangesCount(changesCount + 1);
|
||||
}}
|
||||
style={{ marginTop: '8px', lineHeight: '32px' }}
|
||||
>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user