File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
2121} from '../../common/strings' ;
2222import {
2323 CALLBACK ,
24+ COUNT ,
2425 DO_ACTIONS_AND_ROLLBACK_PARAMS ,
2526 DO_ROLLBACK_PARAM ,
2627 EXPORT ,
@@ -523,7 +524,7 @@ export const getStoreCoreApi = (
523524 addProxyMethod (
524525 0 ,
525526 tableName ,
526- ROW + 'Count' ,
527+ ROW + COUNT ,
527528 'number' ,
528529 'Gets the number of Rows in the ' + getTableDoc ( tableId ) ,
529530 EMPTY_STRING ,
@@ -718,7 +719,7 @@ export const getStoreCoreApi = (
718719
719720 // addRowCountListener
720721 addProxyListener (
721- ROW + 'Count' ,
722+ ROW + COUNT ,
722723 rowCountListenerType ,
723724 getListenerDoc ( 15 , 3 ) ,
724725 `tableId: ${ tableIdType } | null` ,
Original file line number Diff line number Diff line change 22 A ,
33 AND_REGISTERS ,
44 CALLBACK ,
5+ COUNT ,
56 DEL ,
67 DEPS ,
78 DEPS_SUFFIX ,
@@ -37,6 +38,7 @@ import {
3738 GET ,
3839 IDS ,
3940 LISTENER ,
41+ NUMBER ,
4042 ROW ,
4143 ROW_IDS ,
4244 SORTED_ROW_IDS ,
@@ -666,6 +668,16 @@ export const getStoreUiReactApi = (
666668 TABLE_ID ,
667669 ) ;
668670
671+ // useRowCount
672+ addProxyHook (
673+ tableName + ROW + COUNT ,
674+ ROW + COUNT ,
675+ NUMBER ,
676+ 'Gets the number of Rows in ' + getTableDoc ( tableId ) + AND_REGISTERS ,
677+ EMPTY_STRING ,
678+ TABLE_ID ,
679+ ) ;
680+
669681 // useRowIds
670682 const useRowIds = addProxyHook (
671683 tableName + ROW_IDS ,
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export const AND_REGISTERS =
2323 ', and registers a listener so that any changes to ' +
2424 'that result will cause a re-render' ;
2525export const CALLBACK = 'Callback' ;
26+ export const COUNT = 'Count' ;
2627export const DEL = 'Del' ;
2728export const DEPS = 'Deps' ;
2829export const DEPS_SUFFIX = DEPS + '?: React.DependencyList' ;
You can’t perform that action at this time.
0 commit comments