Added description in methods On

This commit is contained in:
MaxOvs19 2023-01-31 14:50:03 +03:00
parent 63d5f0e35f
commit 784eb578fd
5 changed files with 17 additions and 9 deletions

View File

@ -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.

View File

@ -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.

4
package-lock.json generated
View File

@ -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",

View File

@ -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",

View File

@ -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');