Skip to content

Commit

Permalink
fix: setting checked
Browse files Browse the repository at this point in the history
  • Loading branch information
cole committed Jul 1, 2024
1 parent a2fb64e commit d58c3eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/packages/table/components/column-setting/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ export default defineComponent({

/* v8 ignore next 8 */
function onCheckClick (evt) {
const { checked: targetChecked } = evt.target
const { checked: targetChecked } = evt.target || {}
const values = reduce(unref(columnsMap), (result, column, key) => {
const checked = column.disable ? column.checked : targetChecked
const { hideInSetting, disable } = column || {}
const checked = hideInSetting || disable ? column.checked : targetChecked
return set(result, key, { ...column, checked: checked })
}, {})
setColumnsMap && setColumnsMap(values)
Expand Down

0 comments on commit d58c3eb

Please sign in to comment.