mirror of
https://github.com/gosticks/react-table.git
synced 2025-10-16 11:55:36 +00:00
parent
e0a6a04137
commit
9a8dc0feda
@ -5,7 +5,11 @@ route: /changelog
|
||||
|
||||
# React Table Changelog
|
||||
|
||||
## 7.0.1 🎉
|
||||
## 7.0.2
|
||||
|
||||
- Fixed an issue where the internal flexRenderer would not work correctly in production due to the strangest friggin' minification bug I've ever encountered. 🤷♂️
|
||||
|
||||
## 7.0.1
|
||||
|
||||
- Added the `value` property to cell renderers so that destructurin the value from the `cell` property is now not necessary. This should help with people migrating from v6 and also just to cut down on noise in cell renderers
|
||||
- Fixed an issue where rollup would not build correctly
|
||||
|
||||
@ -210,18 +210,22 @@ export function flexRender(Comp, props) {
|
||||
return isReactComponent(Comp) ? <Comp {...props} /> : Comp
|
||||
}
|
||||
|
||||
function isClassComponent(component) {
|
||||
function isReactComponent(component) {
|
||||
return (
|
||||
typeof component === 'function' &&
|
||||
!!(() => {
|
||||
let proto = Object.getPrototypeOf(component)
|
||||
return proto.prototype && proto.prototype.isReactComponent
|
||||
})()
|
||||
isClassComponent(component) ||
|
||||
typeof component === 'function' ||
|
||||
isExoticComponent(component)
|
||||
)
|
||||
}
|
||||
|
||||
function isFunctionComponent(component) {
|
||||
return typeof component === 'function'
|
||||
function isClassComponent(component) {
|
||||
return (
|
||||
typeof component === 'function' &&
|
||||
(() => {
|
||||
const proto = Object.getPrototypeOf(component)
|
||||
return proto.prototype && proto.prototype.isReactComponent
|
||||
})()
|
||||
)
|
||||
}
|
||||
|
||||
function isExoticComponent(component) {
|
||||
@ -231,11 +235,3 @@ function isExoticComponent(component) {
|
||||
['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)
|
||||
)
|
||||
}
|
||||
|
||||
function isReactComponent(component) {
|
||||
return (
|
||||
isClassComponent(component) ||
|
||||
isFunctionComponent(component) ||
|
||||
isExoticComponent(component)
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user