mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Remove isSelectable
table prop
- this is now automatically detected by the presence of the `selectable` prop and no longer needs to be passed manually
This commit is contained in:
parent
fc31f49b42
commit
6897cc25e8
45 changed files with 1 additions and 52 deletions
|
@ -242,7 +242,6 @@ export function Table<T extends UserContentCommonSchema>({
|
|||
data-test-subj="itemsInMemTable"
|
||||
rowHeader="attributes.title"
|
||||
tableCaption={tableCaption}
|
||||
isSelectable
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -147,7 +147,6 @@ export const DrilldownTable: React.FC<DrilldownTableProps> = ({
|
|||
items={drilldowns}
|
||||
itemId="id"
|
||||
columns={columns}
|
||||
isSelectable={true}
|
||||
responsiveBreakpoint={false}
|
||||
selection={{
|
||||
onSelectionChange: (selection) => {
|
||||
|
|
|
@ -118,7 +118,6 @@ const ContextEditorComponent: React.FC<Props> = ({
|
|||
columns={columns}
|
||||
compressed={true}
|
||||
data-test-subj="contextEditor"
|
||||
isSelectable={true}
|
||||
itemId={FIELDS.FIELD}
|
||||
items={rows}
|
||||
pagination={pagination}
|
||||
|
|
|
@ -317,7 +317,6 @@ export const CategoryTable: FC<Props> = ({
|
|||
compressed
|
||||
items={categories}
|
||||
columns={columns}
|
||||
isSelectable={true}
|
||||
selection={selectionValue}
|
||||
itemId="key"
|
||||
onTableChange={onTableChange}
|
||||
|
|
|
@ -341,7 +341,6 @@ export class AutoFollowPatternTable extends PureComponent {
|
|||
pagination={pagination}
|
||||
sorting={sorting}
|
||||
selection={selection}
|
||||
isSelectable={true}
|
||||
rowProps={() => ({
|
||||
'data-test-subj': 'row',
|
||||
})}
|
||||
|
|
|
@ -326,7 +326,6 @@ export class FollowerIndicesTable extends PureComponent {
|
|||
pagination={pagination}
|
||||
sorting={sorting}
|
||||
selection={selection}
|
||||
isSelectable={true}
|
||||
rowProps={() => ({
|
||||
'data-test-subj': 'row',
|
||||
})}
|
||||
|
|
|
@ -482,7 +482,6 @@ export const DataVisualizerTable = <T extends DataVisualizerTableItem>({
|
|||
pagination={pagination}
|
||||
sorting={sorting}
|
||||
itemIdToExpandedRowMap={itemIdToExpandedRowMap}
|
||||
isSelectable={false}
|
||||
onTableChange={onTableChange}
|
||||
data-test-subj={`dataVisualizerTable-${loading ? 'loading' : 'loaded'}`}
|
||||
rowProps={(item) => ({
|
||||
|
|
|
@ -335,7 +335,6 @@ export const PackagePoliciesTable: React.FunctionComponent<Props> = ({
|
|||
},
|
||||
],
|
||||
}}
|
||||
isSelectable={false}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -307,7 +307,6 @@ export const AgentPolicyListPage: React.FunctionComponent<{}> = () => {
|
|||
items={agentPolicyData ? agentPolicyData.items : []}
|
||||
itemId="id"
|
||||
columns={columns}
|
||||
isSelectable={false}
|
||||
pagination={{
|
||||
pageIndex: pagination.currentPage - 1,
|
||||
pageSize: pagination.pageSize,
|
||||
|
|
|
@ -337,7 +337,6 @@ export const AgentListTable: React.FC<Props> = (props: Props) => {
|
|||
totalItemCount: totalAgents,
|
||||
pageSizeOptions,
|
||||
}}
|
||||
isSelectable={true}
|
||||
selection={
|
||||
!authz.fleet.allAgents
|
||||
? undefined
|
||||
|
|
|
@ -131,7 +131,6 @@ export const ComponentTable: FunctionComponent<Props> = ({
|
|||
const tableProps: EuiInMemoryTableProps<ComponentTemplateListItem> = {
|
||||
tableLayout: 'auto',
|
||||
itemId: 'name',
|
||||
isSelectable: true,
|
||||
'data-test-subj': 'componentTemplatesTable',
|
||||
sorting: { sort: { field: 'name', direction: 'asc' } },
|
||||
selection: {
|
||||
|
|
|
@ -271,7 +271,6 @@ export const DataStreamTable: React.FunctionComponent<Props> = ({
|
|||
columns={columns}
|
||||
search={searchConfig}
|
||||
sorting={sorting}
|
||||
isSelectable={true}
|
||||
selection={selectionConfig}
|
||||
pagination={pagination}
|
||||
rowProps={() => ({
|
||||
|
|
|
@ -169,7 +169,6 @@ export const PoliciesTable: FunctionComponent<Props> = ({
|
|||
search={search}
|
||||
pagination={pagination}
|
||||
sorting={true}
|
||||
isSelectable={false}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -281,7 +281,6 @@ export const LegacyTemplateTable: React.FunctionComponent<Props> = ({
|
|||
columns={columns}
|
||||
search={searchConfig}
|
||||
sorting={sorting}
|
||||
isSelectable={true}
|
||||
selection={selectionConfig}
|
||||
pagination={pagination}
|
||||
rowProps={() => ({
|
||||
|
|
|
@ -282,7 +282,6 @@ export const TemplateTable: React.FunctionComponent<Props> = ({
|
|||
columns={columns}
|
||||
search={searchConfig}
|
||||
sorting={sorting}
|
||||
isSelectable={true}
|
||||
selection={selectionConfig}
|
||||
pagination={pagination}
|
||||
rowProps={() => ({
|
||||
|
|
|
@ -114,7 +114,6 @@ export const PipelineTable: FunctionComponent<Props> = ({
|
|||
|
||||
const tableProps: EuiInMemoryTableProps<Pipeline> = {
|
||||
itemId: 'name',
|
||||
isSelectable: true,
|
||||
'data-test-subj': 'pipelinesTable',
|
||||
sorting: { sort: { field: 'name', direction: 'asc' } },
|
||||
selection: {
|
||||
|
|
|
@ -186,7 +186,6 @@ function PipelinesTableUi({
|
|||
<EuiInMemoryTable
|
||||
columns={columns}
|
||||
data-test-subj="pipelineTable"
|
||||
isSelectable={isSelectable}
|
||||
itemId="id"
|
||||
items={pipelines}
|
||||
message={message}
|
||||
|
|
|
@ -281,7 +281,6 @@ export const DataFrameAnalyticsList: FC<Props> = ({
|
|||
allowNeutralSort={false}
|
||||
columns={columns}
|
||||
itemIdToExpandedRowMap={itemIdToExpandedRowMap}
|
||||
isSelectable={false}
|
||||
items={analytics}
|
||||
itemId={DataFrameAnalyticsListColumn.id}
|
||||
loading={isLoading}
|
||||
|
|
|
@ -238,7 +238,6 @@ export function AnalyticsIdSelector({
|
|||
pagination={pagination}
|
||||
sorting={true}
|
||||
selection={selectionValue}
|
||||
isSelectable={true}
|
||||
/>
|
||||
),
|
||||
},
|
||||
|
@ -259,7 +258,6 @@ export function AnalyticsIdSelector({
|
|||
pagination={pagination}
|
||||
sorting={true}
|
||||
selection={selectionValue}
|
||||
isSelectable={true}
|
||||
/>
|
||||
),
|
||||
});
|
||||
|
|
|
@ -257,7 +257,6 @@ export const AllocatedModels: FC<AllocatedModelsProps> = ({
|
|||
<EuiInMemoryTable<AllocatedModel>
|
||||
allowNeutralSort={false}
|
||||
columns={columns}
|
||||
isSelectable={false}
|
||||
items={models}
|
||||
itemId={'key'}
|
||||
rowProps={(item) => ({
|
||||
|
|
|
@ -221,7 +221,6 @@ export const NodesList: FC<NodesListProps> = ({ compactView = false }) => {
|
|||
allowNeutralSort={false}
|
||||
columns={columns}
|
||||
itemIdToExpandedRowMap={itemIdToExpandedRowMap}
|
||||
isSelectable={false}
|
||||
items={items}
|
||||
itemId={'id'}
|
||||
loading={isLoading}
|
||||
|
|
|
@ -170,7 +170,6 @@ export const ProcessorsStats: FC<ProcessorsStatsProps> = ({ stats }) => {
|
|||
<EuiInMemoryTable<ProcessorStatsItem>
|
||||
allowNeutralSort={false}
|
||||
columns={columns}
|
||||
isSelectable={false}
|
||||
items={items}
|
||||
itemId={'id'}
|
||||
rowProps={(item) => ({
|
||||
|
|
|
@ -397,7 +397,6 @@ export const NotificationsList: FC = () => {
|
|||
|
||||
<EuiBasicTable<NotificationItem>
|
||||
columns={columns}
|
||||
isSelectable={false}
|
||||
items={itemsPerPage}
|
||||
itemId={'id'}
|
||||
loading={isLoading}
|
||||
|
|
|
@ -112,7 +112,6 @@ export const AnalyticsTable: FC<Props> = ({ items }) => {
|
|||
allowNeutralSort={false}
|
||||
className="mlAnalyticsTable"
|
||||
columns={columns}
|
||||
isSelectable={false}
|
||||
items={items}
|
||||
itemId={DataFrameAnalyticsListColumn.id}
|
||||
onTableChange={onTableChange}
|
||||
|
|
|
@ -186,7 +186,6 @@ export const AnomalyDetectionTable: FC<Props> = ({ items, chartsService }) => {
|
|||
allowNeutralSort={false}
|
||||
className="mlAnomalyDetectionTable"
|
||||
columns={columns}
|
||||
isSelectable={false}
|
||||
items={groupsList}
|
||||
itemId={AnomalyDetectionListColumns.id}
|
||||
onTableChange={onTableChange}
|
||||
|
|
|
@ -142,7 +142,6 @@ export const CalendarsListTable = ({
|
|||
sorting={sorting}
|
||||
loading={loading}
|
||||
selection={tableSelection}
|
||||
isSelectable={true}
|
||||
data-test-subj={loading ? 'mlCalendarTable loading' : 'mlCalendarTable loaded'}
|
||||
rowProps={(item) => ({
|
||||
'data-test-subj': `mlCalendarListRow row-${item.calendar_id}`,
|
||||
|
|
|
@ -213,7 +213,6 @@ export function FilterListsTable({
|
|||
pagination={true}
|
||||
sorting={sorting}
|
||||
selection={tableSelection}
|
||||
isSelectable={true}
|
||||
data-test-subj="mlFilterListsTable"
|
||||
rowProps={(item) => ({
|
||||
'data-test-subj': `mlFilterListRow row-${item.filter_id}`,
|
||||
|
|
|
@ -81,7 +81,6 @@ export const Table = () => {
|
|||
onChange={onTableChange}
|
||||
pagination={pagination}
|
||||
data-test-subj="datasetQualityTable"
|
||||
isSelectable
|
||||
rowProps={{
|
||||
'data-test-subj': 'datasetQualityTableRow',
|
||||
}}
|
||||
|
|
|
@ -42,7 +42,6 @@ export const HostsTable = () => {
|
|||
<EuiBasicTable
|
||||
data-test-subj={`hostsView-table-${loading ? 'loading' : 'loaded'}`}
|
||||
itemId="id"
|
||||
isSelectable
|
||||
selection={selection}
|
||||
pagination={{
|
||||
pageIndex: pagination.pageIndex ?? 0,
|
||||
|
|
|
@ -424,7 +424,6 @@ export class RemoteClusterTable extends Component {
|
|||
pagination={pagination}
|
||||
sorting={sorting}
|
||||
selection={selection}
|
||||
isSelectable={true}
|
||||
data-test-subj="remoteClusterListTable"
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -421,7 +421,6 @@ export class ReportListingTable extends Component<ListingPropsInternal, State> {
|
|||
}
|
||||
pagination={pagination}
|
||||
selection={selection}
|
||||
isSelectable={true}
|
||||
onChange={this.onTableChange}
|
||||
data-test-subj={REPORT_TABLE_ID}
|
||||
rowProps={() => ({ 'data-test-subj': REPORT_TABLE_ROW_ID })}
|
||||
|
|
|
@ -289,7 +289,6 @@ export class RoleMappingsGridPage extends Component<Props, State> {
|
|||
pagination={pagination}
|
||||
loading={loadState === 'loadingTable'}
|
||||
message={message}
|
||||
isSelectable={true}
|
||||
rowProps={() => {
|
||||
return {
|
||||
'data-test-subj': 'roleMappingRow',
|
||||
|
|
|
@ -191,7 +191,6 @@ export class RolesGridPage extends Component<Props, State> {
|
|||
'data-test-subj': `roleRow`,
|
||||
};
|
||||
}}
|
||||
isSelectable
|
||||
/>
|
||||
</ActionsEuiTableFormatting>
|
||||
</>
|
||||
|
|
|
@ -282,7 +282,6 @@ export class UsersGridPage extends Component<Props, State> {
|
|||
search={search}
|
||||
sorting={sorting}
|
||||
rowProps={rowProps}
|
||||
isSelectable
|
||||
/>
|
||||
}
|
||||
</>
|
||||
|
|
|
@ -61,7 +61,6 @@ const ExceptionsLinkedToListsComponent: React.FC<ExceptionsLinkedToListComponent
|
|||
items={listAndReferences}
|
||||
error={error}
|
||||
columns={getSharedListsTableColumns()}
|
||||
isSelectable={false}
|
||||
sorting
|
||||
data-test-subj="exceptionItemSharedList"
|
||||
/>
|
||||
|
|
|
@ -86,7 +86,6 @@ export const AddPrebuiltRulesTable = React.memo(() => {
|
|||
initialPageSize: RULES_TABLE_INITIAL_PAGE_SIZE,
|
||||
pageSizeOptions: RULES_TABLE_PAGE_SIZE_OPTIONS,
|
||||
}}
|
||||
isSelectable
|
||||
selection={{
|
||||
selectable: () => true,
|
||||
onSelectionChange: selectRules,
|
||||
|
|
|
@ -108,7 +108,6 @@ export const UpgradePrebuiltRulesTable = React.memo(() => {
|
|||
initialPageSize: RULES_TABLE_INITIAL_PAGE_SIZE,
|
||||
pageSizeOptions: RULES_TABLE_PAGE_SIZE_OPTIONS,
|
||||
}}
|
||||
isSelectable
|
||||
selection={{
|
||||
selectable: () => true,
|
||||
onSelectionChange: selectRules,
|
||||
|
|
|
@ -88,13 +88,7 @@ export const AlertsCountComponent: React.FC<AlertsCountProps> = ({
|
|||
|
||||
return (
|
||||
<Wrapper data-test-subj="alertsCountTable" className="eui-yScroll">
|
||||
<EuiInMemoryTable
|
||||
isSelectable={false}
|
||||
columns={tableColumns}
|
||||
items={items}
|
||||
loading={loading}
|
||||
sorting={true}
|
||||
/>
|
||||
<EuiInMemoryTable columns={tableColumns} items={items} loading={loading} sorting={true} />
|
||||
</Wrapper>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -194,7 +194,6 @@ export const RiskInputsTab = ({ entityType, entityName }: RiskInputsTabProps) =>
|
|||
sorting
|
||||
selection={euiTableSelectionProps}
|
||||
onTableChange={onTableChange}
|
||||
isSelectable
|
||||
itemId="_id"
|
||||
/>
|
||||
</>
|
||||
|
|
|
@ -157,7 +157,6 @@ const RowRenderersBrowserComponent = ({
|
|||
columns={columns}
|
||||
search={search}
|
||||
sorting={initialSorting}
|
||||
isSelectable={true}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -418,7 +418,6 @@ export const PolicyTable: React.FunctionComponent<Props> = ({
|
|||
sorting={sorting}
|
||||
selection={selection}
|
||||
pagination={pagination}
|
||||
isSelectable={true}
|
||||
rowProps={() => ({
|
||||
'data-test-subj': 'row',
|
||||
})}
|
||||
|
|
|
@ -300,7 +300,6 @@ export const RepositoryTable: React.FunctionComponent<Props> = ({
|
|||
sorting={sorting}
|
||||
selection={selection}
|
||||
pagination={pagination}
|
||||
isSelectable={true}
|
||||
rowProps={() => ({
|
||||
'data-test-subj': 'row',
|
||||
})}
|
||||
|
|
|
@ -330,7 +330,6 @@ export const SnapshotTable: React.FunctionComponent<Props> = (props: Props) => {
|
|||
});
|
||||
}}
|
||||
loading={isLoading}
|
||||
isSelectable={true}
|
||||
selection={selection}
|
||||
pagination={pagination}
|
||||
rowProps={() => ({
|
||||
|
|
|
@ -356,7 +356,6 @@ export const TransformList: FC<TransformListProps> = ({
|
|||
className="transform__TransformTable"
|
||||
columns={columns}
|
||||
error={searchError}
|
||||
isSelectable={false}
|
||||
items={filteredTransforms}
|
||||
itemId={TRANSFORM_LIST_COLUMN.ID}
|
||||
itemIdToExpandedRowMap={itemIdToExpandedRowMap}
|
||||
|
|
|
@ -515,7 +515,6 @@ export const WatchListPage = () => {
|
|||
},
|
||||
}}
|
||||
selection={selectionConfig}
|
||||
isSelectable={true}
|
||||
childrenBetween={
|
||||
queryError && (
|
||||
<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue