Currently to modify the properties of my component I use this : this.props.store.props.write("configuration", context.configuration);
However, I noticed that when I delete an element from my array, it is correctly deleted but not its bindings.
This means that when the first element is deleted, the second takes its place and thus recovers its bindings.
What is the correct method to completely remove a props and its bindings?
Why do you have bindings on elements you plan to delete?
Dont do this.
Also you probably shouldnt delete through the component like that atall, but instead send an event or use extension functions to call the gateway.
See the component as frontend, and use the events/delegate/extension functions as backend to call the gateway.
This will allow the developers who use your component to handle the logic to delete things
delegates + extension functions allows you to “wait” for a reply from the backend to then do some other logic in the frontend. It is rather complex to set up, but extremely flexible to mix a bith of frontend logic with backend.
(see the extension function in alarms table component, where its used as some sort of filter)
event you probably already know plenty about^^ And i recommend this option first as its a lot easier to work with.
I can correctly read/write to my component’s props from my Delegate using the PropertyTree class.
However, it is impossible to interact with the bindings, which are stored at the Component level and not at the props level.
Does anyone have an idea ? My goal is to remove a binding.
Yes, I understand, but this is only for using the designer in preview mode. (F5)
Anyway, I’ve done a lot of research and I don’t think it’s possible.
So I’m going to give up my idea for deleting elements but leave it for creating.