# behaviour with default settings of optional widgets

**URL:** <https://forum.knime.com/t/behaviour-with-default-settings-of-optional-widgets/90621>\
**Category:** Node Development\
**Created:** [November 12, 2025, 2:20pm UTC](https://forum.knime.com/t/behaviour-with-default-settings-of-optional-widgets/90621 "2025-11-12T14:20:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![niederle](https://forum-cdn.knime.com/user_avatar/forum.knime.com/niederle/32/42_2.png) [@niederle](https://forum.knime.com/u/niederle)\
**Post date:** [November 12, 2025, 2:20pm UTC](https://forum.knime.com/t/behaviour-with-default-settings-of-optional-widgets/90621/1 "2025-11-12T14:20:09Z")

</div>

While implementing my own node with an `@OptionalWidget` setting, I came across the following behavior which is probably not wanted? Instead of putting my own code here I first confirmed the behavior on the implementation of the ‘Row Sampler’ on KNIME 5.8 STS.

By default, the setting `Fix random seed` is enabled and has a default value. Now I do the following:

1. change the value
2. apply the settings
3. disable this setting
4. enable this setting

Now, the random seed is set back to its default value instead of the one I applied. If I change the value again to what I chose before, the `Apply`-Button becomes disabled (as the setting most likely is still set to my custom setting).

Please let me know, if this behavior is wanted and if not how to prevent it. Is there any way to retrieve the current setting from the `computeState` method of the DefaultValueProvider class?

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [February 10, 2026, 2:20pm UTC](https://forum.knime.com/t/behaviour-with-default-settings-of-optional-widgets/90621/2 "2026-02-10T14:20:25Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
