@@ -234,8 +234,11 @@ function demo() {
234
234
if ( order > 0 ) {
235
235
var listId = "dims" + t ;
236
236
var formatNameId = "format" + t ;
237
- var formatName = tblFormatsView . namesCache . hasOwnProperty ( t ) ?
238
- tblFormatsView . namesCache [ t ] : "Dense array" ;
237
+ var namesList = tblFormatsView . getFormatNamesList ( order ) ;
238
+
239
+ var nameCached = ( cached && tblFormatsView . namesCache . hasOwnProperty ( t ) &&
240
+ namesList . concat ( [ "Custom" ] ) . includes ( tblFormatsView . namesCache [ t ] ) ) ;
241
+ var formatName = nameCached ? tblFormatsView . namesCache [ t ] : "Dense array" ;
239
242
240
243
listTensorsBody += "<tr>" ;
241
244
listTensorsBody += "<td class=\"mdl-data-table__cell--non-numeric\" " ;
@@ -265,7 +268,7 @@ function demo() {
265
268
listTensorsBody += formatNameId ;
266
269
listTensorsBody += "\">" ;
267
270
268
- for ( var name of tblFormatsView . getFormatNamesList ( order ) ) {
271
+ for ( var name of namesList ) {
269
272
listTensorsBody += "<li><a id=\"" ;
270
273
listTensorsBody += formatNameId + "_" + name + "\" >" ;
271
274
listTensorsBody += name + "</a></li>" ;
@@ -380,6 +383,7 @@ function demo() {
380
383
381
384
for ( t in model . input . tensorOrders ) {
382
385
if ( model . input . tensorOrders [ t ] > 0 ) {
386
+ tblFormatsView . insertNamesCacheEntry ( t , $ ( "#format" + t ) . val ( ) ) ;
383
387
tblFormatsView . insertLevelsCacheEntry ( t ,
384
388
tblFormatsView . createEntryFromId ( "dims" + t ) ) ;
385
389
}
0 commit comments