auto check options

This commit is contained in:
Rizky 2024-04-03 20:32:05 +07:00
parent 38ddf4b909
commit 610b9efc85
1 changed files with 2 additions and 0 deletions

View File

@ -375,6 +375,8 @@ const SingleCheckbox = ({
` `
)} )}
onClick={() => { onClick={() => {
if (item.checked) return;
if (item.options) { if (item.options) {
let idx = val.findIndex((e) => { let idx = val.findIndex((e) => {
if (typeof e === "object" && e.value === item.value) { if (typeof e === "object" && e.value === item.value) {