| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | import styles from './style.module.scss'; |
| 7 | 7 | |
| 8 | 8 | import {__} from '@wordpress/i18n'; |
| 9 | 9 | |
| 10 | -const Table = ({title, columns, data, columnFilters, stripped, isLoading, isSorting, ...rest}) => { | |
| 10 | +const Table = ({title = null, columns = [], data = [], columnFilters = {}, stripped = false, isLoading = false, isSorting, ...rest}) => { | |
| 11 | 11 | const [state, setState] = useState({}); |
| 12 | 12 | const [cachedData, setCachedData] = useState([]); |
| 13 | 13 | |
| 14 | 14 | Table.resetSortState = () => { |
| @@ -158,16 +158,7 @@ | ||
| 158 | 158 | // Stripped rows |
| 159 | 159 | stripped: PropTypes.bool, |
| 160 | 160 | // Show spinner if data is loading |
| 161 | 161 | isLoading: PropTypes.bool, |
| 162 | -}; | |
| 163 | - | |
| 164 | -Table.defaultProps = { | |
| 165 | - title: null, | |
| 166 | - columns: [], | |
| 167 | - data: [], | |
| 168 | - columnFilters: {}, | |
| 169 | - stripped: true, | |
| 170 | - isLoading: false, | |
| 171 | 162 | }; |
| 172 | 163 | |
| 173 | 164 | export default Table; |