This commit is contained in:
Henry Jameson 2022-03-29 12:31:51 +03:00
parent 7f3b678477
commit 60695b583a

View file

@ -69,6 +69,9 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => {
const controlledName = `controlled${camelized}`
const uncontrolledName = `uncontrolled${camelized}`
res[name] = function () {
debugger
console.log(this)
console.log(Object.getOwnPropertyDescriptor(this, toggle))
return (Object.getOwnPropertyDescriptor(this, toggle) && this[toggle]) ? this[controlledName] : this[uncontrolledName]
}
return res