Skip to content

Passing a key to renderThumb causes an error #205

@nwatab

Description

@nwatab

Each child in a list should have a unique "key" prop.
Check the render method of Range. See https://react.dev/link/warning-keys for more information.

  // @ts-expect-error props should have a key
  renderThumb={({key, ...props }) => (
    <div
      key={key}
      {...props}
      style={{
        // ...props.style,
        height: '16px',
        width: '16px',
        borderRadius: '50%',
        backgroundColor: '#FFF',
        border: '2px solid #548BF4',
      }}
    />
  )}

versions:
"next": "15.1.7",
"react-range": "1.10.0"

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