MCPcopy Index your code
hub / github.com/PAIR-code/lit / keys

Method keys

lit_nlp/client/modules/data_table_module.ts:125–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123 // Column names from the current data for the data table.
124 @computed
125 get keys(): ColumnHeader[] {
126 function createColumnHeader(name: string, type: LitType) {
127 const [minWidth, maxWidth] = type.name in LIT_TYPE_MIN_MAX_WIDTHS ?
128 LIT_TYPE_MIN_MAX_WIDTHS[type.name] : [];
129
130 const header = {
131 name,
132 maxWidth,
133 minWidth,
134 width: maxWidth,
135 vocab: (type as LitTypeWithVocab).vocab
136 };
137
138 if (type instanceof BooleanLitType) {
139 header.vocab = ['✔', ' '];
140 }
141 return header;
142 }
143
144 // Use currentInputData to get keys / column names because filteredData
145 // might have 0 length;
146 const keyNames = this.appState.currentInputDataKeys;
147 const keys =
148 keyNames.map(key => createColumnHeader(key, this.dataSpec[key]));
149 const dataKeys = this.dataService.cols.map(
150 col => createColumnHeader(col.name, col.dataType));
151 return keys.concat(dataKeys);
152 }
153
154 // Filtered keys that hide ones tagged as not to be shown by default in the
155 // data table. The filtered ones can still be enabled through the "Columns"

Callers 15

_build_metadataMethod · 0.80
_create_modelMethod · 0.80
_get_metricsMethod · 0.80
_handlerMethod · 0.80
__init__Method · 0.80
configureMethod · 0.80
matrixSizesMethod · 0.80
firstUpdatedMethod · 0.80
renderHeaderControlsMethod · 0.80
invalidNumericFieldsMethod · 0.80
datapointEditedMethod · 0.80
renderEditableFieldsMethod · 0.80

Calls

no outgoing calls