MCPcopy Create free account
hub / github.com/angular/components / defaultDataAccessor

Function defaultDataAccessor

src/cdk/table/text-column.spec.ts:111–122  ·  view source on GitHub ↗
(data: TestData, name: string)

Source from the content-addressed store, hash-verified

109
110 it('should be able to provide a general data accessor', () => {
111 const defaultDataAccessor = (data: TestData, name: string) => {
112 switch (name) {
113 case 'propertyA':
114 return `A: ${data.propertyA}`;
115 case 'propertyB':
116 return `B: ${data.propertyB}`;
117 case 'propertyC':
118 return `C: ${data.propertyC}`;
119 default:
120 return '';
121 }
122 };
123 createTestComponent({defaultDataAccessor});
124
125 expectTableToMatchContent(tableElement, [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected