You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.
I am seeing a similar issue. Changing gid works fine in unpublished worksheets but not in published spreadsheets. The problem can be fixed by modifying three functions in google-sheets.html
First the conditional in the gidChanged() function changes to check for worksheetId OR key so that getCellRows will actually be called in the case of a published spreadsheet.
and then modifying the way url is set in getCellRows() function
getCellRows: function() {
// Use cached data if available.
var key = generateCacheKey_.bind(this)();
if (key in rowDataCache_) {
this.onCellRows(null, null, rowDataCache_[key]);
return;
}
var url = "";
if (this.worksheetId_){
url = SCOPE_ + '/list/' +
this.worksheetId_ + '/' + gid_to_wid_(this.gid) +
'/private/full';
this.$.cellrowsajax.url = url;
}
else if (this.key){
url = SCOPE_ + '/list/' + this.key + '/' +
gid_to_wid_(this.gid) + '/public/values';
this.$.cellrowsajax.url = url;
}
},
finally to enable the basic caching to work with published spreadsheets modify the generateCacheKey_() function to use either the worksheetId (unpublished spreadsheets) or the key (published spreadsheets)
function generateCacheKey_() {
var sheetId = this.worksheetId_ || this.key;
return sheetId + '_'+ this.gid;
}
Happy to do a pull request if this fix is in line with authors thinking. I am working on this in a non traditional fashion (no bower, no server side environment) so I don't have polymer cloned at the moment.
From the doc "If
gid
is updated at a later time, the underlying data is also updated".So I did try that on the map-sheet demo:
But nothing happens. I assumed at least left section would be updated...
So I also tried changing the other one:
Also no update.
BTW. Changing
key
also don't do much (this is my test sheet key):I assumed this would all work pretty much the same as changing
src
attribute on images.Tested in Chrome 35 (current latest), Windows 7.
The text was updated successfully, but these errors were encountered: