-
-
-
-
-
- {pageText}{' '}
- {showPageJump ? (
-
- {
- const val: string = e.target.value;
- this.setState({
- tempPage: val,
- });
- }}
- value={tempPage || String(page + 1)}
- onBlur={this.applyTempPage}
- onKeyPress={e => {
- if (e.key === 'Enter') {
- this.applyTempPage(e);
- }
- }}
- />
-
- ) : (
- {page + 1}
- )}{' '}
- {ofText} {pages || 1}
-
- {showPageSizeOptions && (
-
- onPageSizeChange(Number(e.target.value))} value={pageSize}>
- {pageSizeOptions.map((option: any, i: number) => (
-
- ))}
-
-
- )}
-
-
-
-
-
- );
- }
-}
diff --git a/web-console/src/bootstrap/react-table-defaults.tsx b/web-console/src/bootstrap/react-table-defaults.tsx
index 7cb6e11ce91..9058b95839d 100644
--- a/web-console/src/bootstrap/react-table-defaults.tsx
+++ b/web-console/src/bootstrap/react-table-defaults.tsx
@@ -20,9 +20,13 @@ import React from 'react';
import { Filter, ReactTableDefaults } from 'react-table';
import { Loader } from '../components';
-import { booleanCustomTableFilter, countBy, makeTextFilter } from '../utils';
-
-import { ReactTableCustomPagination } from './react-table-custom-pagination';
+import {
+ booleanCustomTableFilter,
+ DEFAULT_TABLE_CLASS_NAME,
+ GenericFilterInput,
+ ReactTablePagination,
+} from '../react-table';
+import { countBy } from '../utils';
const NoData = React.memo(function NoData(props) {
const { children } = props;
@@ -32,7 +36,7 @@ const NoData = React.memo(function NoData(props) {
export function bootstrapReactTable() {
Object.assign(ReactTableDefaults, {
- className: '-striped -highlight',
+ className: DEFAULT_TABLE_CLASS_NAME,
defaultFilterMethod: (filter: Filter, row: any) => {
const id = filter.pivotId || filter.id;
return booleanCustomTableFilter(filter, row[id]);
@@ -40,8 +44,8 @@ export function bootstrapReactTable() {
LoadingComponent: Loader,
loadingText: '',
NoDataComponent: NoData,
- FilterComponent: makeTextFilter(),
- PaginationComponent: ReactTableCustomPagination,
+ FilterComponent: GenericFilterInput,
+ PaginationComponent: ReactTablePagination,
AggregatedComponent: function Aggregated(opt: any) {
const { subRows, column } = opt;
const previewValues = subRows
diff --git a/web-console/src/components/action-cell/action-cell.scss b/web-console/src/components/action-cell/action-cell.scss
index 52838723edd..722ca892966 100644
--- a/web-console/src/components/action-cell/action-cell.scss
+++ b/web-console/src/components/action-cell/action-cell.scss
@@ -16,7 +16,11 @@
* limitations under the License.
*/
+@import '../../variables';
+
.action-cell {
+ padding: $table-cell-v-padding $table-cell-h-padding;
+
& > * {
margin-right: 10px;
diff --git a/web-console/src/components/action-cell/action-cell.tsx b/web-console/src/components/action-cell/action-cell.tsx
index 9863e616aab..0433eca2b08 100644
--- a/web-console/src/components/action-cell/action-cell.tsx
+++ b/web-console/src/components/action-cell/action-cell.tsx
@@ -44,7 +44,7 @@ export const ActionCell = React.memo(function ActionCell(props: ActionCellProps)
{onDetail &&