I've got a simple widget that toggles a boolean but it stays on false and never rerenders. What am I doing wrong?
import { property } from 'esri/core/accessorSupport/decorators';
import { tsx } from 'esri/widgets/support/widget';
import esriWidget = require('esri/widgets/Widget');
const CSS = {
base: 'redline-widget esri-widget--panel esri-widget',
button: 'btn btn-white btn-sm btn-primary pull-right',
loading: 'esri-icon-loading-indicator esri-rotating'
};
class Test extends esriWidget {
constructor(config: any) {
super();
setInterval(() => {
this.processing = !this.processing;
}, 5000);
}
@property()
processing: boolean;
render() {
return (
<div class={CSS.base}>
{this.processing ? "True" : "False"}
</div>
);
}
}
export = Test;