pixel-react-excel-sheet 1.0.39 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Excel/Types.d.ts +1 -1
- package/lib/index.esm.js +6 -2
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +6 -2
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Excel/ExcelFile/ExcelFile.tsx +4 -2
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Cell.tsx +1 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +2 -0
- package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +3 -0
- package/src/components/Excel/ExcelFile.stories.tsx +8 -4
- package/src/components/Excel/Types.ts +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -32659,6 +32659,8 @@ const INITIAL_STATE = {
|
|
|
32659
32659
|
}
|
|
32660
32660
|
};
|
|
32661
32661
|
function reducer(state, action) {
|
|
32662
|
+
console.log(state.model);
|
|
32663
|
+
console.log(action.type);
|
|
32662
32664
|
switch (action.type) {
|
|
32663
32665
|
case SET_AUTO_FILL:
|
|
32664
32666
|
{
|
|
@@ -35820,6 +35822,7 @@ const Spreadsheet = props => {
|
|
|
35820
35822
|
onEvaluatedDataChange = () => {},
|
|
35821
35823
|
contextOption
|
|
35822
35824
|
} = props;
|
|
35825
|
+
console.log(props.data);
|
|
35823
35826
|
const initialState = React.useMemo(() => {
|
|
35824
35827
|
const createParser = props.createFormulaParser || createFormulaParser;
|
|
35825
35828
|
const model = new Model(createParser, props.data);
|
|
@@ -36202,7 +36205,7 @@ const ExcelFile = ({
|
|
|
36202
36205
|
if (payload) {
|
|
36203
36206
|
const sheetNames = payload.map(e => e.sheetName);
|
|
36204
36207
|
setSheetNames(sheetNames);
|
|
36205
|
-
if (checkEmpty(sheetNames.length)) {
|
|
36208
|
+
if (!checkEmpty(sheetNames.length)) {
|
|
36206
36209
|
pageRef.current = sheetNames[0] ? sheetNames[0] : ''; //Ternary is required, must use ''
|
|
36207
36210
|
setSelectedSheet({
|
|
36208
36211
|
name: sheetNames[0] ? sheetNames[0] : '',
|
|
@@ -36229,7 +36232,8 @@ const ExcelFile = ({
|
|
|
36229
36232
|
}
|
|
36230
36233
|
spreadsheetData[rowIndex][colIndex] = {
|
|
36231
36234
|
value: checkVal(cell.value),
|
|
36232
|
-
style: convertStyleToFrontend(cell?.
|
|
36235
|
+
style: convertStyleToFrontend(cell?.styles),
|
|
36236
|
+
//TODO remove 's' for Style
|
|
36233
36237
|
type: true
|
|
36234
36238
|
};
|
|
36235
36239
|
}
|