Skip to content

The arguments of the set method cannot be null #1271

@Vasily257

Description

@Vasily257

Hi! I think I've found a little problem: the arguments of the set method cannot be null, although this is a valid value according to the documentation: https://refreshless.com/nouislider/slider-read-write/#section-setting

A temporary solution — to pass a 'null'.

P.S. Thanks for the awesome slider!

export interface API {
    destroy: () => void;
    steps: () => NextStepsForHandle[];
    on: (eventName: string, callback: EventCallback) => void;
    off: (eventName: string) => void;
    get: (unencoded?: boolean) => GetResult;

    // The null value should be allowed here
    set: (input: number | string | (number | string)[], fireSetEvent?: boolean, exactInput?: boolean) => void;

    setHandle: (handleNumber: number, value: number | string, fireSetEvent?: boolean, exactInput?: boolean) => void;
    reset: (fireSetEvent?: boolean) => void;
    disable: (handleNumber?: number) => void;
    enable: (handleNumber?: number) => void;
    options: Options;
    updateOptions: (optionsToUpdate: UpdatableOptions, fireSetEvent: boolean) => void;
    target: HTMLElement;
    removePips: () => void;
    removeTooltips: () => void;
    getTooltips: () => {
        [handleNumber: number]: HTMLElement | false;
    };
    getOrigins: () => {
        [handleNumber: number]: HTMLElement;
    };
    pips: (grid: Pips) => HTMLElement;
}

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