Requesting help/additional resources with implementing NumberField in my properties panel

Hi everyone,

I am currently experimenting with extending the properties panel of various components. Currently I am trying to add a NumberFieldEntry field. /bpmn-io/properties-panel/blob/main/src/components/entries/NumberField.js

I am seeking advice for some of the props required, and would appreciate some guidance/more resources to look at. I am currently referencing the Properties Panel Extension Example but I am still quite confused as to how some of the props work/what do I need to do/pass in.

Apart from more examples/documentation that would aid me, my questions are

  1. How exactly do I use/what function do I pass into setValue and getValue props? I understand that the example does use these 2 props, but I do not fully understand how/why it works
  2. I have tried setting the min and max props but they dont seem to work as intended. E.g. if the max is set to 500, any value below 500 works fine, but when I console log the value for e.g. 1900 it returns 190 instead, and on the frontend 1900 is still displayed for the user.

Thank you for taking the time to read this post and wishing everyone a wonderful day.

Additionally, I would like to find out if there is a way to set the default values of any fields in the property panels. I tried using useStates but it wouldnt work as the component would be re-render every time it is clicked away and back to it.

For example, I would like to set the default value of the Time To Live field under history cleanup in the properties panel of process to be 90, as currently by default it is 180.