Socket
Book a DemoInstallSign in
Socket

@mx-cartographer/categories

Package Overview
Dependencies
Maintainers
17
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mx-cartographer/categories

Package containing category selector

6.0.1
latest
npmnpm
Version published
Weekly downloads
60
233.33%
Maintainers
17
Weekly downloads
 
Created
Source

Category Selector Library

This library contains the Category Selector control

Getting started

Installation

  • npm install @mx-cartographer/categories

Usage

CategorySelector must be wrapped by CategoryDataProvider in order for it to have access to the CategoryStore

import { ApiEndpoints, CategoryApi, CategoryStore } from '@mx-cartographer/common'
import { CategoryDataProvider, CategorySelector } from '@mx-cartographer/categories'

export const Example = () => {
  const store = new CategoryStore()
  store.initialize(new CategoryApi('/', ''))
  
  const handleSelected = (guid: string) => {
    // Some action when category is selected
  }
  
  return (
    <CategoryDataProvider onEvent={handleEvent} onSelected={handleSelected} store={store}>
      <CategorySelector />
    </CategoryDataProvider>
  )
}

Optional Props

  • initialSelected: string Set an initially selected category
  • showSelected: boolean Whether or not a checkmark should display on selected categories
  • unselectable: string[] An array of category guids that should not be selectable
  • unselectableText: string Specify what text to show on the tag displayed on unselectable rows (Default is 'Unselectable')

FAQs

Package last updated on 09 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.