* Get all data. * * Each call returns a fresh shallow clone of the source data so consumers can * safely mutate the returned array without affecting subsequent calls or the * underlying data. The fast path skips the per-cell hook lookups in * `getByRange()` and is taken when no `modif
(toArray = false)
| 91 | * @returns {Array} |
| 92 | */ |
| 93 | getData(toArray = false) { |
| 94 | if (!this.data?.length) { |
| 95 | return this.data; |
| 96 | } |
| 97 | |
| 98 | if (!toArray |
| 99 | && !this.hot!.hasHook('modifySourceData') |
| 100 | && !this.hot!.hasHook('modifyRowData')) { |
| 101 | return this.data.map(cloneRow); |
| 102 | } |
| 103 | |
| 104 | return this.getByRange(null, null, toArray); |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Set new data source. |
nothing calls this directly
no test coverage detected