Comments (6)
@eamador I think there is another relevant piece here to verify. When dealing with client-side widgets, this addition to sources wouldn't change the type of results, so I'm assuming client-side calculations should work the same.
But when using widgets in global mode, a request is done to //v3/sql/${source.connection}/model/${model}`; See packages/react-api/src/api/model.js and my question would be: don't we need to send also queryParameters to that endpoint? If we don't do it so, I guess that we would send just templated query in source, is that right?
from carto-react.
Yes, the requests to model service need to include the queryParameters
. The query template is only usable by builder so no service should work with the queryTemple. C4R always should work with the original query, never with the query template.
The histogram and range widgets call to the Stats API that also needs to include the queryParameters.
Remember that in builder we also call the Stats API we must include the queryParameters in these calls
from carto-react.
Keeping in mind this comments i have created a draft PR so that you could start a quick review and confirm it's ok.
from carto-react.
I am not sure if i miss something, @padawannn could you please help here in order to define what changes we need to do and where?
We'd also need to clarify how widgets should behave, for instance in the global mode..
Thank you!
from carto-react.
LGTM. On redux modifying addSource to include in queryParameters should be enough. For useCartoLayerProps, we have a SourceProps
type where this addition fits.
from carto-react.
Already implemented and released. Nice work @eamador
from carto-react.
Related Issues (20)
- FormulaWidget issue with mode global disabled HOT 14
- [RFC] Add a territory selector widget HOT 3
- [RFC] Save custom geometries created with the SpatialFilter HOT 2
- [RFC] Support for Drop a Pin HOT 3
- [RFC] Support for multi-language HOT 3
- [RFC] Comparative Widgets HOT 5
- [RFC] Save the state of the filters HOT 3
- [RFC] Spatial Filter HOT 11
- GeoJSON support in useCartoLayerProps HOT 1
- queryParameters HOT 7
- Remote executeModel doesn't work for POST requests HOT 4
- quadbinZoom error HOT 2
- Hygen is not working HOT 3
- [RFC] Widget size control HOT 1
- [RFC] Export AnimatedNumber component HOT 1
- [Bug] BarWidgetUI
- [RFC] Site Selection - Information element for widgets
- executeSQL function doesn't return the status error
- Allow passing decimal precision as a prop for CategoryWidgetUI HOT 4
- [Bug] ComparativeCategoryWidgetUI progress bar missing background color
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 carto-react.