Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

heatmap-filter

Package Overview
Dependencies
Maintainers
0
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heatmap-filter

## Adams

  • 1.9.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-92%
Maintainers
0
Weekly downloads
 
Created
Source
## Adams

Heatmap filter component

A filter component to be used only by heatmap.com devs component export tutorial.

🚀 Installation

Install using your package manager of choice:

pnpm add heatmap-filter

📺 Demo

https://matija-components.vercel.app/tri-state-checkbox

⚙️ Usage

Import the component locally or define it globally and include the css file:

<template>
  <!-- create a reset button that dispatched  "reset-all-filters-event"-->
  <button @click="resetAll">reset</button> 
  <!-- disabled comparison mode -->
    <button @click="disabledComparison">disabled Comparison</button>
  <!-- enabled comparison mode -->
  <button @click="enabledComparison">enabled Comparison</button>
  <!-- call the HeatmapFilter -->
  <HeatmapFilter @on-filter-values-change="filterValueChanged" />
  
</template>

<script lang="ts" setup>
import { HeatmapFilter } from "heatmap-filter";

const filterValueChanged = (value: ReturnData[]) => {
  console.log(value);
  // do your stuff here
};

// when ever reset button is clicked, dispatch this event
const resetAll = () => {
  const resetAllEvent = new CustomEvent("reset-all-filters-event");
  document.dispatchEvent(resetAllEvent);
};

const disabledComparison = () => {
  const resetAllEvent = new CustomEvent("disable-comparison-event", {
    detail: { disabled: true },
  });
  document.dispatchEvent(resetAllEvent);
};

const enabledComparison = () => {
  const resetAllEvent = new CustomEvent("disable-comparison-event", {
    detail: { disabled: false },
  });
  document.dispatchEvent(resetAllEvent);
};

</script>

📃 Emitters

NameTypeDefaultDescription
on-filter-values-changefuncget the selected filters by listening to this event

📃 Custom Events

NameTypeDefaultDescription
reset-all-filters-eventfuncfor resetting all filters

Keywords

FAQs

Package last updated on 05 Nov 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc