@@ -144,19 +144,42 @@ export function App() {
144144 schema = { {
145145 type : 'object-grid' ,
146146 objectName : 'contact' ,
147- filters : [ ] ,
147+ // Enable comprehensive features
148+ filterable : true ,
148149 searchableFields : [ 'name' , 'email' , 'company' ] ,
150+ sortable : true ,
151+ resizable : true ,
152+ pagination : {
153+ pageSize : 10
154+ } ,
155+ selection : {
156+ type : 'multiple'
157+ } ,
149158 columns : [
150- { field : 'name' , label : 'Name' , width : 200 } ,
159+ { field : 'name' , label : 'Name' , width : 200 , fixed : 'left' } ,
151160 { field : 'email' , label : 'Email' , width : 220 } ,
152161 { field : 'phone' , label : 'Phone' , width : 150 } ,
153162 { field : 'company' , label : 'Company' , width : 180 } ,
154- { field : 'role' , label : 'Role' , width : 150 } ,
155- { field : 'status' , label : 'Status' }
163+ { field : 'position' , label : 'Position' , width : 150 } ,
164+ { field : 'department' , label : 'Department' , width : 150 } ,
165+ { field : 'priority' , label : 'Priority' , width : 100 } ,
166+ { field : 'salary' , label : 'Salary' , width : 120 } ,
167+ { field : 'commission_rate' , label : 'Commission' , width : 120 } ,
168+ { field : 'birthdate' , label : 'Birthdate' , width : 120 } ,
169+ { field : 'is_active' , label : 'Active' , width : 100 } ,
170+ { field : 'last_contacted' , label : 'Last Contacted' , width : 180 } ,
171+ { field : 'profile_url' , label : 'LinkedIn' , width : 200 } ,
156172 ]
157173 } }
158174 dataSource = { dataSource }
159175 onEdit = { handleEdit }
176+ onRowSelect = { ( selected ) => console . log ( 'Selected rows:' , selected ) }
177+ onDelete = { async ( record ) => {
178+ if ( confirm ( `Are you sure you want to delete ${ record . name } ?` ) ) {
179+ await dataSource ?. delete ( 'contact' , record . id ) ;
180+ setRefreshKey ( k => k + 1 ) ;
181+ }
182+ } }
160183 className = "h-full w-full"
161184 />
162185 </ div >
0 commit comments