From 784eb578fdf346d124d645d980f9e4b6f54610dc Mon Sep 17 00:00:00 2001 From: MaxOvs19 Date: Tue, 31 Jan 2023 14:50:03 +0300 Subject: [PATCH] Added description in methods On --- CHANGELOG.md | 12 +++++++----- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/cg-select.ts | 6 ++++++ 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb9d0c6..485cd16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,11 +26,13 @@ Tested in JS and React. Errors in work in React applications are revealed. - All select rewritten to ts. - Fixed bugs and shortcomings. -### 24.01.2023 - fix 0.2.2 - -- Fixed documentation etc. - -### 27.01.2023 - fix 0.2.3 + 24.01.2023 - fix 0.2.2 - Fixed documentation etc. + 27.01.2023 - fix 0.2.3 - Changed the theme selection function. +- Fixed documentation. + + 31.01.2023 - fix 0.2.31 + +- Adding a new method to track select actions. - Fixed documentation. diff --git a/README.md b/README.md index eea4049..8552656 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # CG-SELECT -## version ~ 0.2.3 +## version ~ 0.2.31 This component allows you to create a custom select. It offers more flexible customization and use of select. Customization, multi-selection and live search by elements are available. diff --git a/package-lock.json b/package-lock.json index 655ca03..4e802d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cg-select", - "version": "0.2.3", + "version": "0.2.31", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cg-select", - "version": "0.2.3", + "version": "0.2.31", "license": "ISC", "dependencies": { "@parcel/optimizer-css": "^2.8.0", diff --git a/package.json b/package.json index 3955f56..db6d8d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cg-select", - "version": "0.2.3", + "version": "0.2.31", "description": "Feature rich Select control for React/JS with multiselect, autocomplete and styling", "author": { "name": "CraftGroup", diff --git a/src/cg-select.ts b/src/cg-select.ts index 9b250a3..c0c567e 100644 --- a/src/cg-select.ts +++ b/src/cg-select.ts @@ -915,6 +915,12 @@ export class CGSelect implements ICgSelect { this.render(select); } + /** + * @description Method for tracking the actions of the select, you can pass a callback + * @param state select state. + * @param callback + * @method on + */ public on(state: string, callback: (state: any) => any) { const options = this.element?.querySelectorAll('.list__item');