npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@scheels-softdev/kendoreact-generics

v4.0.25

Published

This package is a collection of Wrappers for various kendo components that we've found ourselves modifying in the same ways over and over across projects in the same ways. @progress/kendo-react-licensing along with a valid kendo license is recommended (o

Downloads

1,631

Readme

KendoReact Generics

About This Package

What is this package?

This package is a collection of Wrappers for various kendo components that we've found ourselves modifying in the same ways over and over across projects in the same ways. @progress/kendo-react-licensing along with a valid kendo license is recommended (or required depending on whether they change their 'no license' warning to an error in the future).

What modifications have you made specifically?

  • Most of what we're doing has to do with virtualization. The setup for virtualization is a lengthy task, both in lines of code and dev hours. This package exists to help us streamline that process.
  • The other modifications have to do with adding support for placing Comboboxes, Checkboxes, Datepickers, and Switches from Kendo into a Kendo Grid Cell or Filter Cell and handling those events appropriately

Components

Note: This package has only been tested with typescript. if you're using javascript, use at your own risk


Generic Dropdown

Props

data: T[];
selectedId: number;
selectedData?: T;
onChange: event: (ComboBoxChangeEvent) => void;
textField: keyof T;
disabled?: boolean;
idField?: keyof T;
title?: string;
hideClearButton?: boolean;
style?: React.CSSProperties;
isLoading?: boolean;

data

  • Array of T. the Definition of what T is matters for the "textFields" prop

selectedId OR selectedData

  • selectedId is the unique identifier of the item selected. By default the dropdown will assume your item has an "id" property. if it doesn't have an Id but has a unique identifier, see optional keys (idField)
  • selectedData is a reference to the full selected object.
  • Only one of these 2 is needed. it will just use selectedId if both are provided

onChange

  • Event passed is a ComboBoxChangeEvent (from kendo-react-dropdowns)

textField

  • The field of each object to actually display
  • For example, if my dropdown is fed a list of employee objects with a firstName, lastName, and id key, I would pass "firstName" to see "John" or "lastName" to see "Doe". If you need to include multiple fields of the object, see https://www.npmjs.com/package/@scheels-softdev/frontend-utility-functions?activeTab=readme

disabled (optional)

  • If you want to conditionally disable the dropdown you can do that here

idField (optional)

  • IdField is a keyof T, much like textFields. while textFields determines what's displayed in the dropdown, idField overrides what field of each object the dropdown looks at to compare against the selectedId prop
  • For example, if our employee's id field is employeeId instead of just id, we would pass "employeeId" here

title (optional)

  • The label that appears in your multiselect when there aren't any options selected, or just above the multiselect when there are
  • For example, if we want to use it to send a letter to an employee, we would pass "Selected Employee" here

hideClearButton (optional)

  • A boolean indicating whether the clear button should be hidden. by default it will be shown

style (optional)

  • An override to the default styling that ships with kendo

isLoading (optional)

  • A boolean indicating whether your data is still loading or not

MultiSelect Dropdown

Props

data: T[];
selectedData: T[];
textField: keyof T;
onSelect: Function;
title?: string;
limit?: number;

data

  • Array of T. the Definition of what T is matters for the "textFields" prop

selectedData

  • The id of the item selected. By default the dropdown will assume your item has an "id" property. if it doesn't, see optional parameters

textField

  • The field of each object to actually display
  • For example, if my dropdown is fed a list of employee objects with a firstName, lastName, and id key, I would pass "firstName" to see "John" or "lastName" to see "Doe". If you need to include multiple fields of the object, see https://www.npmjs.com/package/@scheels-softdev/frontend-utility-functions?activeTab=readme

onSelect

  • "Event" you're given should just be your new array of selected Items

title (optional)

  • The label that appears in your multiselect when there aren't any options selected, or just above the multiselect when there are
  • For example, if we want to use it to send work anniversary letters to multiple employees, we would pass "Selected Employees" here

limit (optional)

  • The upper limit of how many items the user can select at once.
  • For example, if our meeting room only has room for 8 people, we would pass an 8.

Filter Cell Dropdown

Props

{...GridFilterCellProps} (from @progress/kendo-react-grid)
data: T[];
textField: keyof T;
separator?: string;

{...FilterCellProps}

  • all of the default props that are passed from kendo grid when trying to override the filter cell

data

  • Array of T. What you want to display in the dropdown. the Definition of what T is matters for the "textFields" prop

textField

  • The field of each object to actually display
  • For example, if my dropdown is fed a list of employee objects with a firstName, lastName, and id key, I would pass "firstName" to see "John" or "lastName" to see "Doe". If you need to include multiple fields of the object, see https://www.npmjs.com/package/@scheels-softdev/frontend-utility-functions?activeTab=readme

separator (optional)

  • This defines what your text fields are separated by. by default, it is assumed you only want a space between them. Use this prop if you want to change this
  • For example, if some of our associates only know the status IDs for Active, Terminated, or On Leave and we want to display them side by side, we might want to add a "dash" seporator. to do this we would pass " - " here

ToolbarButton

Props

item: T data: T[] setData: Function

item

An item of type T used for adding a new element.

data

An array of T objects representing the existing data.

setData

A function used to update the data array. Note: The T type extends the CommonProps interface, which includes the following properties:


More Updates to the README Coming Soon!