File tree Expand file tree Collapse file tree
src-docs/src/views/tables/actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,13 +183,14 @@ export default () => {
183183 } else {
184184 let actions : Array < DefaultItemAction < User > > = [
185185 {
186- name : 'Elastic.co' ,
187- description : 'Go to elastic.co' ,
186+ name : 'User profile' ,
187+ description : ( { firstName, lastName } ) =>
188+ `Visit ${ firstName } ${ lastName } 's profile` ,
188189 icon : 'editorLink' ,
189190 color : 'primary' ,
190191 type : 'icon' ,
191- href : 'https://elastic.co' ,
192- target : '_blank ' ,
192+ href : ( { id } ) => ` ${ window . location . href } ?id= ${ id } ` ,
193+ target : '_self ' ,
193194 'data-test-subj' : 'action-outboundlink' ,
194195 } ,
195196 ] ;
@@ -205,13 +206,14 @@ export default () => {
205206 } ,
206207 {
207208 name : ( user : User ) => ( user . id ? 'Delete' : 'Remove' ) ,
208- description : 'Delete this user' ,
209+ description : ( { firstName, lastName } ) =>
210+ `Delete ${ firstName } ${ lastName } ` ,
209211 icon : 'trash' ,
210212 color : 'danger' ,
211213 type : 'icon' ,
212214 onClick : deleteUser ,
213215 isPrimary : true ,
214- 'data-test-subj' : ' action-delete' ,
216+ 'data-test-subj' : ( { id } ) => ` action-delete- ${ id } ` ,
215217 } ,
216218 {
217219 name : 'Edit' ,
You can’t perform that action at this time.
0 commit comments