Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
Signed-off-by: Shey Gao <[email protected]>
  • Loading branch information
Shey Gao committed Jul 31, 2024
1 parent 3f604b5 commit 957bde9
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,42 +417,42 @@ class TableListView extends React.Component<TableListViewProps, TableListViewSta
renderTable() {
const selection = this.props.deleteItems
? {
onSelectionChange: (obj: Item[]) => {
onSelectionChange: (obj: Object[]) => {
this.setState({
selectedIds: obj
.map((item) => item.id)
.map((item: any) => item.id)

Check warning on line 423 in src/plugins/opensearch_dashboards_react/public/table_list_view/table_list_view.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/opensearch_dashboards_react/public/table_list_view/table_list_view.tsx#L423

Added line #L423 was not covered by tests
.filter((id: undefined | string): id is string => Boolean(id)),
});
},
}
: undefined;

const actions = [
{
name: i18n.translate(
'opensearch-dashboards-react.tableListView.listing.table.editActionName',
{
defaultMessage: 'Edit',
}
),
description: i18n.translate(
'opensearch-dashboards-react.tableListView.listing.table.editActionDescription',
{
defaultMessage: 'Edit',
}
),
icon: 'pencil',
type: 'icon',
enabled: ({ error }: { error: string }) => !error,
render: (item: Item) => (
<EditActionDropdown
item={item}
editItem={this.props.editItem}
visbuilderEditItem={this.props.visbuilderEditItem}
/>
),
},
];
const actions = [
{
name: i18n.translate(
'opensearch-dashboards-react.tableListView.listing.table.editActionName',
{
defaultMessage: 'Edit',
}
),
description: i18n.translate(
'opensearch-dashboards-react.tableListView.listing.table.editActionDescription',
{
defaultMessage: 'Edit',
}
),
icon: 'pencil',
type: 'icon',
enabled: ({ error }: { error: string }) => !error,
render: (item: Item) => (
<EditActionDropdown

Check warning on line 448 in src/plugins/opensearch_dashboards_react/public/table_list_view/table_list_view.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/opensearch_dashboards_react/public/table_list_view/table_list_view.tsx#L448

Added line #L448 was not covered by tests
item={item}
editItem={this.props.editItem}
visbuilderEditItem={this.props.visbuilderEditItem}
/>
),
},
];

const search = {
onChange: this.setFilter.bind(this),
Expand Down
31 changes: 28 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15986,7 +15986,7 @@ string-similarity@^4.0.1:
resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-4.0.4.tgz#42d01ab0b34660ea8a018da8f56a3309bb8b2a5b"
integrity sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -16021,6 +16021,15 @@ string-width@^3.0.0:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^5.0.1, string-width@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
Expand Down Expand Up @@ -16099,7 +16108,7 @@ stringify-entities@^3.0.1:
character-entities-legacy "^1.0.0"
xtend "^4.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -16141,6 +16150,13 @@ strip-ansi@^5.1.0, strip-ansi@^5.2.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1:
version "7.1.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
Expand Down Expand Up @@ -18284,7 +18300,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -18310,6 +18326,15 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit 957bde9

Please sign in to comment.