react-admin-base-bootstrap 0.8.12 → 0.8.13
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.
|
@@ -20,6 +20,12 @@ const RowDataContext = React.createContext(null);
|
|
|
20
20
|
export function useDataTableContext() {
|
|
21
21
|
return useContext(DataTableContext);
|
|
22
22
|
}
|
|
23
|
+
export function useRows() {
|
|
24
|
+
return useContext(RowDatasContext);
|
|
25
|
+
}
|
|
26
|
+
export function useRow() {
|
|
27
|
+
return useContext(RowDataContext);
|
|
28
|
+
}
|
|
23
29
|
export function Actions({ edit, del, rowSpan, children }) {
|
|
24
30
|
const [api] = useAuth();
|
|
25
31
|
const [, setParams] = useContext(DataTableContext);
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import BootstrapTable, { RowRenderer, CustomRenderer, Actions, ActionsColumn, Column, default as BootstrapDataTable, IdColumn, useDataTableContext } from './Components/BootstrapDataTable';
|
|
1
|
+
import BootstrapTable, { useRows, useRow, RowRenderer, CustomRenderer, Actions, ActionsColumn, Column, default as BootstrapDataTable, IdColumn, useDataTableContext } from './Components/BootstrapDataTable';
|
|
2
2
|
import CRUD, { CRUDActions, ModalEntityEditor } from './Components/CRUD';
|
|
3
3
|
import EntityEditor from "./Components/EntityEditor";
|
|
4
4
|
import ExcelExportButton from './Components/ExcelExportButton';
|
|
@@ -23,4 +23,4 @@ import DefaultValidatorOptions from './Components/DefaultValidatorOptions';
|
|
|
23
23
|
import DragAndDropArrow from './Components/DragAndDropArrow';
|
|
24
24
|
import BootstrapOptionsProvider, { useBootstrapOptions } from './Components/BootstrapOptions';
|
|
25
25
|
import BootstrapModal from './Components/BootstrapModal';
|
|
26
|
-
export { ThemeProvider, useTheme, useAllThemes, useIsMobile, useMenuState, DefaultValidatorOptions, PasswordInput, StepList, StepItem, TopProgressBar, CRUD, ModalEntityEditor, CRUDActions, Relative, ApiSelect, Preview, ExcelExportButton, ExternalLoginButton, SingleFilePicker, MultiFilePicker, ImagePicker, BootstrapTable, EntityEditor, GoToTop, Validator, ValueValidator, ValidationErrors, LoadingButton, BootstrapDataTable, IdColumn, Column, ActionsColumn, Actions, useDataTableContext, RowRenderer, CustomRenderer, LanguageProvider, useLanguage, LanguageSwitcher, ErrorBoundary, CheckBox, DragAndDropArrow, useBootstrapOptions, BootstrapOptionsProvider, BootstrapModal, CreateSelect };
|
|
26
|
+
export { ThemeProvider, useTheme, useAllThemes, useIsMobile, useMenuState, DefaultValidatorOptions, PasswordInput, StepList, StepItem, TopProgressBar, CRUD, ModalEntityEditor, CRUDActions, Relative, ApiSelect, Preview, ExcelExportButton, ExternalLoginButton, SingleFilePicker, MultiFilePicker, ImagePicker, BootstrapTable, EntityEditor, GoToTop, Validator, ValueValidator, ValidationErrors, LoadingButton, BootstrapDataTable, IdColumn, Column, ActionsColumn, Actions, useDataTableContext, RowRenderer, CustomRenderer, LanguageProvider, useLanguage, LanguageSwitcher, ErrorBoundary, CheckBox, DragAndDropArrow, useBootstrapOptions, BootstrapOptionsProvider, BootstrapModal, CreateSelect, useRow, useRows };
|
package/lib/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import BootstrapTable, { RowRenderer, CustomRenderer, Actions, ActionsColumn, Column, default as BootstrapDataTable, IdColumn, useDataTableContext } from './Components/BootstrapDataTable';
|
|
1
|
+
import BootstrapTable, { useRows, useRow, RowRenderer, CustomRenderer, Actions, ActionsColumn, Column, default as BootstrapDataTable, IdColumn, useDataTableContext } from './Components/BootstrapDataTable';
|
|
2
2
|
import CRUD, { CRUDActions, ModalEntityEditor } from './Components/CRUD';
|
|
3
3
|
import EntityEditor from "./Components/EntityEditor";
|
|
4
4
|
import ExcelExportButton from './Components/ExcelExportButton';
|
|
@@ -23,4 +23,4 @@ import DefaultValidatorOptions from './Components/DefaultValidatorOptions';
|
|
|
23
23
|
import DragAndDropArrow from './Components/DragAndDropArrow';
|
|
24
24
|
import BootstrapOptionsProvider, { useBootstrapOptions } from './Components/BootstrapOptions';
|
|
25
25
|
import BootstrapModal from './Components/BootstrapModal';
|
|
26
|
-
export { ThemeProvider, useTheme, useAllThemes, useIsMobile, useMenuState, DefaultValidatorOptions, PasswordInput, StepList, StepItem, TopProgressBar, CRUD, ModalEntityEditor, CRUDActions, Relative, ApiSelect, Preview, ExcelExportButton, ExternalLoginButton, SingleFilePicker, MultiFilePicker, ImagePicker, BootstrapTable, EntityEditor, GoToTop, Validator, ValueValidator, ValidationErrors, LoadingButton, BootstrapDataTable, IdColumn, Column, ActionsColumn, Actions, useDataTableContext, RowRenderer, CustomRenderer, LanguageProvider, useLanguage, LanguageSwitcher, ErrorBoundary, CheckBox, DragAndDropArrow, useBootstrapOptions, BootstrapOptionsProvider, BootstrapModal, CreateSelect };
|
|
26
|
+
export { ThemeProvider, useTheme, useAllThemes, useIsMobile, useMenuState, DefaultValidatorOptions, PasswordInput, StepList, StepItem, TopProgressBar, CRUD, ModalEntityEditor, CRUDActions, Relative, ApiSelect, Preview, ExcelExportButton, ExternalLoginButton, SingleFilePicker, MultiFilePicker, ImagePicker, BootstrapTable, EntityEditor, GoToTop, Validator, ValueValidator, ValidationErrors, LoadingButton, BootstrapDataTable, IdColumn, Column, ActionsColumn, Actions, useDataTableContext, RowRenderer, CustomRenderer, LanguageProvider, useLanguage, LanguageSwitcher, ErrorBoundary, CheckBox, DragAndDropArrow, useBootstrapOptions, BootstrapOptionsProvider, BootstrapModal, CreateSelect, useRow, useRows };
|
package/package.json
CHANGED
|
@@ -14,6 +14,14 @@ export function useDataTableContext() {
|
|
|
14
14
|
return useContext(DataTableContext);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export function useRows() {
|
|
18
|
+
return useContext(RowDatasContext);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function useRow() {
|
|
22
|
+
return useContext(RowDataContext);
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
type ActionsProp = {
|
|
18
26
|
edit?: string;
|
|
19
27
|
del?: string;
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import BootstrapTable, { RowRenderer, CustomRenderer, Actions, ActionsColumn, Column, default as BootstrapDataTable, IdColumn, useDataTableContext } from './Components/BootstrapDataTable';
|
|
2
|
+
import BootstrapTable, { useRows, useRow, RowRenderer, CustomRenderer, Actions, ActionsColumn, Column, default as BootstrapDataTable, IdColumn, useDataTableContext } from './Components/BootstrapDataTable';
|
|
3
3
|
import CRUD, { CRUDActions, ModalEntityEditor } from './Components/CRUD';
|
|
4
4
|
import EntityEditor from "./Components/EntityEditor";
|
|
5
5
|
import ExcelExportButton from './Components/ExcelExportButton';
|
|
@@ -55,5 +55,6 @@ export {
|
|
|
55
55
|
useBootstrapOptions,
|
|
56
56
|
BootstrapOptionsProvider,
|
|
57
57
|
BootstrapModal,
|
|
58
|
-
CreateSelect
|
|
58
|
+
CreateSelect,
|
|
59
|
+
useRow, useRows
|
|
59
60
|
};
|