@@ -18,10 +18,8 @@ import type {
1818 StatusPanelDef ,
1919 GetContextMenuItemsParams ,
2020 MenuItemDef ,
21- IServerSideDatasource ,
22- IServerSideGetRowsParams
2321} from 'ag-grid-community' ;
24- import type { DataSource , FieldMetadata , ObjectSchemaMetadata } from '@object-ui/types' ;
22+ import type { FieldMetadata , ObjectSchemaMetadata } from '@object-ui/types' ;
2523import type { ObjectAgGridImplProps } from './object-aggrid.types' ;
2624import { FIELD_TYPE_TO_FILTER_TYPE } from './object-aggrid.types' ;
2725import { createFieldCellRenderer , createFieldCellEditor } from './field-renderers' ;
@@ -62,7 +60,6 @@ export default function ObjectAgGridImpl({
6260 const [ error , setError ] = useState < Error | null > ( null ) ;
6361 const [ objectSchema , setObjectSchema ] = useState < ObjectSchemaMetadata | null > ( null ) ;
6462 const [ rowData , setRowData ] = useState < any [ ] > ( [ ] ) ;
65- const [ totalCount , setTotalCount ] = useState ( 0 ) ;
6663
6764 // Fetch object metadata
6865 useEffect ( ( ) => {
@@ -116,7 +113,6 @@ export default function ObjectAgGridImpl({
116113
117114 const result = await dataSource . find ( objectName , queryParams ) ;
118115 setRowData ( result . data || [ ] ) ;
119- setTotalCount ( result . total || 0 ) ;
120116 callbacks ?. onDataLoaded ?.( result . data || [ ] ) ;
121117 } catch ( err ) {
122118 const error = err instanceof Error ? err : new Error ( String ( err ) ) ;
@@ -417,15 +413,6 @@ export default function ObjectAgGridImpl({
417413 ) ;
418414}
419415
420- /**
421- * Escape HTML to prevent XSS attacks
422- */
423- function escapeHtml ( text : string ) : string {
424- const div = document . createElement ( 'div' ) ;
425- div . textContent = text ;
426- return div . innerHTML ;
427- }
428-
429416/**
430417 * Get filter type based on field metadata
431418 */
0 commit comments