Comparing version 3.1.1 to 3.1.2
import * as React from 'react'; | ||
var Loading = function (props) { | ||
var loading = props.loading; | ||
if (loading) { | ||
var enabled = props.enabled; | ||
if (enabled) { | ||
return (React.createElement("div", { className: 'ka-loading' }, | ||
@@ -6,0 +6,0 @@ React.createElement("div", { className: 'ka-loading-icon' }))); |
@@ -36,3 +36,3 @@ var __assign = (this && this.__assign) || function () { | ||
var areAllRowsSelected = data.length === selectedRows.length; | ||
var isLoadingActive = loading; | ||
var isLoadingActive = loading && loading.enabled; | ||
var kaCss = isLoadingActive ? 'ka ka-loading-active' : 'ka'; | ||
@@ -46,3 +46,3 @@ return (React.createElement("div", { className: kaCss }, | ||
React.createElement(TableBody, __assign({}, props, { childAttributes: childAttributes, columns: preparedOptions.columns, data: preparedOptions.groupedData, dispatch: dispatch, editableCells: editableCells, editingMode: editingMode, groupColumnsCount: preparedOptions.groupColumnsCount, groupedColumns: preparedOptions.groupedColumns, groupsExpanded: groupsExpanded, selectedRows: selectedRows }))), | ||
React.createElement(Loading, { loading: loading }))); | ||
React.createElement(Loading, { enabled: isLoadingActive }))); | ||
}; |
{ | ||
"name": "ka-table", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": "github:komarovalexander/ka-table", |
@@ -30,6 +30,6 @@ var __assign = (this && this.__assign) || function () { | ||
case ActionType.HideLoading: { | ||
return __assign(__assign({}, state), { loading: false }); | ||
return __assign(__assign({}, state), { loading: { enabled: false } }); | ||
} | ||
case ActionType.ShowLoading: { | ||
return __assign(__assign({}, state), { loading: true }); | ||
return __assign(__assign({}, state), { loading: { enabled: true } }); | ||
} | ||
@@ -36,0 +36,0 @@ case ActionType.OpenEditor: { |
@@ -25,6 +25,6 @@ | ||
case ActionType.HideLoading: { | ||
return { ...state, loading: false }; | ||
return { ...state, loading: { enabled: false } }; | ||
} | ||
case ActionType.ShowLoading: { | ||
return { ...state, loading: true }; | ||
return { ...state, loading: { enabled: true } }; | ||
} | ||
@@ -31,0 +31,0 @@ case ActionType.OpenEditor: { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
202817