Comments (1)
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.
gidChanged: function() {
if (this.worksheetId_ || this.key) {
this.getCellRows();
}
}
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 google-sheets.
Related Issues (20)
- Fix bower resolutions HOT 1
- Published version of Google Sheets/Docs not updating HOT 13
- License is Apache 2.0, but several files are "all rights reserved". HOT 4
- Cannot access published data sheet
- Specify GID other than "0" produces console error HOT 1
- Port to 0.8
- Header row data not included in with cell row data HOT 5
- Re-assess port HOT 1
- Demo not fully funcitonal HOT 2
- How to load and display rows on page load? HOT 1
- Update tests to WCT
- Replace deprecated iron-flex-layout import with new custom-style module
- Migrate to Sheets API
- OAuth2 Issue?
- Maintenance release
- Getting 401 when accessing public spreadsheet. Also when moving to polymer 2.0?
- Google sheets
- Investigate other ways to install google-map for the demo
- Handle private feeds when `key` changes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-sheets.