Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
507 B
1
Indexable
Never
const handleCheckChange = (id, event) => {
    const clients = userClients.map((client) => {
      if (id === client.id) {
        client.isChecked = event.target.checked;
      }
      return client;
    });
    setUserClients(clients);
  };

  const handleCheckAllChange = (event) => {
    const clients = userClients.map((client) => {
      client.isChecked = event.target.checked;
      return client;
    });
    setUserClients(clients);
    setIsCheckedAll(event.target.checked);
  };