|
POST
|
Here is an example of why waiting for this.props has been an issue for me. The object is sometimes Null....which seems very odd. import { AllWidgetProps, BaseWidget, jsx, React } from 'jimu-core';
import { JimuMapViewComponent, JimuMapView } from "jimu-arcgis";
import { IMConfig } from '../config';
export default class Widget extends BaseWidget<AllWidgetProps<IMConfig>, any> {
constructor(props) {
super(props);
console.log(this.props) // This returns the props object. props.user is empty
// as I would expect since the user has not logged in yet.
this.state = {
jimuMapView: null
}
}
activeViewChangeHandler = (jmv: JimuMapView) => {
if (jmv) {
this.setState({
jimuMapView: jmv
})
}
};
// "is invoked immediately after updating occurs. This method is not called for the initial render. "
// "Use this as an opportunity to operate on the DOM when the component has been updated."
//https://reactjs.org/docs/react-component.html#componentdidupdate
componentDidUpdate(prevProps) {
// console log will be updated after user logs in.
console.log(prevProps.user) // returns Null
console.log(this.props.user) // returns Null
if (this.props.user !== prevProps.user) {
console.log(this.props.user) // Condition not met
}
}
render() {
let mvc = <p>Please select a map.</p>;
if (
this.props.hasOwnProperty("useMapWidgetIds") &&
this.props.useMapWidgetIds &&
this.props.useMapWidgetIds.length === 1
) {
mvc = (
<JimuMapViewComponent
useMapWidgetIds={this.props.useMapWidgetIds}
onActiveViewChange={this.activeViewChangeHandler}
/>
);
};
return (
<div className="widget-demo jimu-widget m-2">
{mvc}
</div>
);
}
}
... View more
09-30-2020
09:20 AM
|
0
|
1
|
4347
|
|
POST
|
How might a widget know that a user has successfully logged in? Is there a message I can listen for? Seems the message/action route isn't ready for this yet as the message list is short: https://developers.arcgis.com/experience-builder/api-reference/jimu-core/MessageType Is there some other built-in method for identifying a successful log in? I'm currently waiting for props.user to populate but this is problematic for several reasons.
... View more
09-30-2020
08:30 AM
|
0
|
10
|
5107
|
|
POST
|
Hi Junshan, thanks for your reply. For clarity I'd like to share how this can be replicated: From a clean install, copy ..\client\your-extensions\widgets\simple Paste to ..\client\dist\widgets Launch builder and copy widget into Experience Modify render or return functions to write to console. (console.log("test")) Launch Experience and open Dev Tools console. Click Simple Widget: console will show "test" Close Simple Widget Open Simple Widget: console will show "test" twice. Is there any way I can avoid this behavior? You mention that when a prop changes this will cause the widget to re-render. In this example I am not changing state or props and yet after the initial load of the widget it is rendered twice.
... View more
09-23-2020
10:24 AM
|
0
|
0
|
3776
|
|
POST
|
Would someone from the Experience Builder team please chime in here? This is easy to replicate. Since this issue is present in the broader React community it seems a simple workaround might be available. David Martinez , Jianxia Song ?
... View more
09-22-2020
09:45 AM
|
0
|
0
|
3776
|
|
POST
|
Boilerplate widgets (Simple, Editor) are called twice. According to various write ups this is due to React.StrictMode and is expected. It's an intentional feature of the StrictMode. This only happens in development, and helps find accidental side effects put into the render phase. I'd expect this shouldn't happen in a published app, but it does. Here is a raw copy of the Simple widget. "here" hits the console twice in a published app. render() {
return (
<div className="widget-demo jimu-widget m-2">
<p>Simple Widget</p>
<p>exampleConfigProperty: {this.props.config.exampleConfigProperty}</p>
{console.log("here")}
</div>
);
} Is this a bug? If not, how might I avoid my widget rendering twice?
... View more
09-14-2020
11:50 AM
|
0
|
7
|
3876
|
|
POST
|
Arcpy at Pro 2.6 now includes a Geocoding module and Locator class. Locator—ArcGIS Pro | Documentation
... View more
07-28-2020
02:09 PM
|
1
|
1
|
2334
|
|
POST
|
Hello We found most geometric functions broke the Attribute Table widget. This seemed to be unrelated to the size of the dataset and only applied to layers inside a group in the Web Map. A workaround that might apply to your setup is to add a layer at the layer level and set an expression on the layer. In WAB turn off the layer in the Layer List widget, if applicable. This seems to properly trigger the load of the Arcade module. This is the bug that was created. It doesn't appear to be public yet. BUG-000131959 Bug is now public: BUG-000131959: The Attribute Table widget fails to load the feature..
... View more
07-07-2020
08:14 AM
|
0
|
0
|
1657
|
|
POST
|
I'm seeing a bug where a field with an Arcade Expression in a web map will blow up Attribute Table Widget. This is in version 2.12 - 2.16. Currently working through this with premium support. TypeError: Cannot read property 'geodesicBuffer' of null
... View more
06-16-2020
08:05 AM
|
0
|
2
|
1657
|
|
POST
|
I spoke with Premium Support. Looks like I was referencing the wrong ID. Thanks again, Thomas Hervey
... View more
06-15-2020
02:02 PM
|
0
|
1
|
1598
|
|
IDEA
|
Checking in again. The API was updated again and functionality dropped. Difficult to code around a moving target.
... View more
06-15-2020
02:00 PM
|
0
|
0
|
1150
|
|
POST
|
Any update Jianxia Song? Will vector tile basemaps be available in the Basemap Gallery Widget at a future release?
... View more
06-15-2020
01:53 PM
|
0
|
0
|
683
|
|
POST
|
When opening results from the Query Widget (from the Layer List) in Attribute Table Widget an error is thrown. I can also replicate this at 2.13. TypeError: Cannot read property 'toLowerCase' of undefined at Object.f.focus (init.js:271) at Object._applyA11y2TabContainer (WidgetMixin.js?wab_dv=2.16:285) at Object.applyA11y (WidgetMixin.js?wab_dv=2.16:96) at Object.initDiv (Widget.js?wab_dv=2.16:898) at Object._init (Widget.js?wab_dv=2.16:315) at Object.<anonymous> (Widget.js?wab_dv=2.16:249) at init.js:64 ....and so on.
... View more
06-11-2020
02:43 PM
|
0
|
0
|
630
|
|
POST
|
Any luck? I'm seeing this in the Attribute Table Widget at 2.16.
... View more
06-11-2020
02:40 PM
|
0
|
0
|
3215
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-06-2022 02:52 PM | |
| 1 | 07-27-2023 10:51 AM | |
| 2 | 11-14-2023 08:48 AM | |
| 1 | 10-27-2021 11:50 AM | |
| 2 | 12-11-2023 04:10 PM |
| Online Status |
Offline
|
| Date Last Visited |
04-29-2024
11:30 AM
|