Hello, I have followed the tutorials (text and video) from appsmith regarding the custom widget data model. My problem persists in multiple new apps I created more exactly the platform > widget data model updates do not get propagated.
Other bindings with other elements are working.
I tried with appsmith-ce 1.40, 1.45, 1.47, 1.48
I tried Chrome and safari
I tried with bindings query, text and select inputs.
I have no extra installed library.
the simplest example is
default model
{
"select": "{{Select1.selectedOptionValue}}",
"text":"{{Input1.text}}"
}
// Importing necessary React libraries
import React from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'
import reactDom from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'
function App() {
return (<div>
<p>select: {appsmith.model.select}</p>
<p>text: {appsmith.model.text}</p>
</div>)
}
console.log("load")
appsmith.onReady(() => {
console.log("ready")
const root = document.getElementById('root');
reactDom.render(<App />, root);
appsmith.onModelChange = (newModel) => {
console.log("model changed",newModel)
reactDom.render(<App />, root);
}
appsmith.onUiChange = () => {
console.log("ui changed", appsmith.model)
reactDom.render(<App />, root);
}
});
the methods onModelChange are not called when the inputs data bindings changed, the console logs never gets triggered.
I see the console logs load and ready but not the others.
Since there is no js method to programatically push new data model, and from the widget I cannot access the other components, and the bindings are not working I am stuck.