Skip to content

onChange callback on range slider doesn't provide changed value #42

@polyclick

Description

@polyclick

When creating a new slider with an onChange callback, the changed value is not provided to the callback function. This does work with a normal number input.

// logs the changed value
this.gui.addPanel()
  .addGroup()
    .addSubGroup()
      .addNumberInput(obj, `value`, { onChange: (changedVal) => { console.log(changedVal) } })

Slider:

// logs -undefined-
this.gui.addPanel()
  .addGroup()
    .addSubGroup()
        .addSlider(obj, `value`, `range`, { onChange: (changedVal) => { console.log(changedVal) } })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions