diff --git a/src-docs/src/views/tables/actions/actions.tsx b/src-docs/src/views/tables/actions/actions.tsx index de0e830ce72..b58480ada7a 100644 --- a/src-docs/src/views/tables/actions/actions.tsx +++ b/src-docs/src/views/tables/actions/actions.tsx @@ -262,8 +262,10 @@ export default () => { const selection: EuiTableSelectionType = { selectable: (user: User) => user.online, - selectableMessage: (selectable: boolean) => - !selectable ? 'User is currently offline' : '', + selectableMessage: (selectable: boolean, user: User) => + !selectable + ? `${user.firstName} ${user.lastName} is currently offline` + : `Select ${user.firstName} ${user.lastName}`, onSelectionChange, }; diff --git a/src-docs/src/views/tables/expanding_rows/expanding_rows.tsx b/src-docs/src/views/tables/expanding_rows/expanding_rows.tsx index dbcdf236090..5bc6b62a6bd 100644 --- a/src-docs/src/views/tables/expanding_rows/expanding_rows.tsx +++ b/src-docs/src/views/tables/expanding_rows/expanding_rows.tsx @@ -187,8 +187,10 @@ export default () => { const selection: EuiTableSelectionType = { selectable: (user: User) => user.online, - selectableMessage: (selectable: boolean) => - !selectable ? 'User is currently offline' : '', + selectableMessage: (selectable: boolean, user: User) => + !selectable + ? `${user.firstName} ${user.lastName} is currently offline` + : `Select ${user.firstName} ${user.lastName}`, onSelectionChange, }; diff --git a/src-docs/src/views/tables/footer/footer.tsx b/src-docs/src/views/tables/footer/footer.tsx index 7909e53d8d9..f6c2aec479a 100644 --- a/src-docs/src/views/tables/footer/footer.tsx +++ b/src-docs/src/views/tables/footer/footer.tsx @@ -206,8 +206,10 @@ export default () => { const selection: EuiTableSelectionType = { selectable: (user: User) => user.online, - selectableMessage: (selectable: boolean) => - !selectable ? 'User is currently offline' : '', + selectableMessage: (selectable: boolean, user: User) => + !selectable + ? `${user.firstName} ${user.lastName} is currently offline` + : `Select ${user.firstName} ${user.lastName}`, onSelectionChange, }; diff --git a/src-docs/src/views/tables/mobile/mobile.tsx b/src-docs/src/views/tables/mobile/mobile.tsx index dd7bf0b5d9c..8f50d211256 100644 --- a/src-docs/src/views/tables/mobile/mobile.tsx +++ b/src-docs/src/views/tables/mobile/mobile.tsx @@ -182,8 +182,10 @@ export default () => { const selection: EuiTableSelectionType = { selectable: (user: User) => user.online, - selectableMessage: (selectable: boolean) => - !selectable ? 'User is currently offline' : '', + selectableMessage: (selectable: boolean, user: User) => + !selectable + ? `${user.firstName} ${user.lastName} is currently offline` + : `Select ${user.firstName} ${user.lastName}`, onSelectionChange, }; diff --git a/src-docs/src/views/tables/selection/selection_controlled.tsx b/src-docs/src/views/tables/selection/selection_controlled.tsx index 45173ff008f..b7b544d7ba8 100644 --- a/src-docs/src/views/tables/selection/selection_controlled.tsx +++ b/src-docs/src/views/tables/selection/selection_controlled.tsx @@ -117,8 +117,10 @@ export default () => { const selection: EuiTableSelectionType = { selectable: (user: User) => user.online, - selectableMessage: (selectable: boolean) => - !selectable ? 'User is currently offline' : '', + selectableMessage: (selectable: boolean, user: User) => + !selectable + ? `${user.firstName} ${user.lastName} is currently offline` + : `Select ${user.firstName} ${user.lastName}`, onSelectionChange, selected: selectedItems, }; diff --git a/src-docs/src/views/tables/selection/selection_uncontrolled.tsx b/src-docs/src/views/tables/selection/selection_uncontrolled.tsx index 3b0da5e2085..9358b7ffa35 100644 --- a/src-docs/src/views/tables/selection/selection_uncontrolled.tsx +++ b/src-docs/src/views/tables/selection/selection_uncontrolled.tsx @@ -112,8 +112,10 @@ export default () => { const selection: EuiTableSelectionType = { selectable: (user: User) => user.online, - selectableMessage: (selectable: boolean) => - !selectable ? 'User is currently offline' : '', + selectableMessage: (selectable: boolean, user: User) => + !selectable + ? `${user.firstName} ${user.lastName} is currently offline` + : `Select ${user.firstName} ${user.lastName}`, onSelectionChange, initialSelected: onlineUsers, };