File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/main/src/components/AnalyticalTable/hooks Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ import { Event } from '@ui5/webcomponents-react-base/lib/Event' ;
12import { CheckBox } from '@ui5/webcomponents-react/lib/CheckBox' ;
23import { TableSelectionMode } from '@ui5/webcomponents-react/lib/TableSelectionMode' ;
34import React from 'react' ;
@@ -15,14 +16,18 @@ const noop = () => {
1516
1617export const useRowSelectionColumn : PluginHook < { } > = ( hooks ) => {
1718 hooks . columns . push ( ( columns , { instance } ) => {
18- const { selectionMode, noSelectionColumn } = instance . webComponentsReactProperties ;
19+ const { selectionMode, noSelectionColumn, onRowSelected } = instance . webComponentsReactProperties ;
1920
2021 if ( selectionMode === TableSelectionMode . NONE || noSelectionColumn ) {
2122 return columns ;
2223 }
2324
2425 const toggleAllRowsSelected = ( e ) => {
25- instance . toggleAllRowsSelected ( e . getParameter ( 'checked' ) ) ;
26+ const allRowsSelected = e . getParameter ( 'checked' ) ;
27+ instance . toggleAllRowsSelected ( allRowsSelected ) ;
28+ if ( typeof onRowSelected === 'function' ) {
29+ onRowSelected ( Event . of ( null , e , { allRowsSelected } ) ) ;
30+ }
2631 } ;
2732
2833 return [
You can’t perform that action at this time.
0 commit comments