diff --git a/.gitignore b/.gitignore
index 37dab9d..0d11f1d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
node_modules
dist
.parcel-cache
+.test
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 533aade..ff03aeb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -67,3 +67,7 @@ Tested in JS and React. Errors in work in React applications are revealed.
### 00.03.2023 - update 0.2.7
- Switch to new webpack project builder.
+
+##### 00.03.2023 - fix 0.2.71
+
+- Select import fixed.
diff --git a/README.md b/README.md
index 3fbf356..404f0c6 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# CG-SELECT
-## version ~ 0.2.7
+## version ~ 0.2.71
ЧИТАТЬ НА РУССКОМ
diff --git a/READMERU.md b/READMERU.md
index 1f45be7..f277480 100644
--- a/READMERU.md
+++ b/READMERU.md
@@ -1,6 +1,6 @@
# CG-SELECT
-## Версия ~ 0.2.7
+## Версия ~ 0.2.71
English README
diff --git a/index.js b/index.js
index 1c9b6a1..d3c8b2f 100644
--- a/index.js
+++ b/index.js
@@ -1,6 +1,3 @@
import { CGSelect } from './src/cg-select';
-let select = new CGSelect();
-select.disabled(true);
-
export default CGSelect;
diff --git a/package-lock.json b/package-lock.json
index 995f327..ae2f34a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "cg-select",
- "version": "0.2.7",
+ "version": "0.2.71",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "cg-select",
- "version": "0.2.7",
+ "version": "0.2.71",
"license": "ISC",
"dependencies": {
"@types/prettier": "^2.7.2",
diff --git a/package.json b/package.json
index 3154276..3561194 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "cg-select",
- "version": "0.2.7",
+ "version": "0.2.71",
"source": "index.js",
"main": "dist/index.js",
"description": "Feature rich Select control for React/JS with multiselect, autocomplete and styling",
diff --git a/src/cg-select.ts b/src/cg-select.ts
index 5a1ceff..e314966 100644
--- a/src/cg-select.ts
+++ b/src/cg-select.ts
@@ -130,10 +130,14 @@ export class CGSelect implements ICgSelect {
* }
*/
constructor(setting: ICgSelect) {
- this.init(setting);
- this.render();
- this.closeSelectClick();
- this.initEvent();
+ if (setting) {
+ this.init(setting);
+ this.render();
+ this.closeSelectClick();
+ this.initEvent();
+ } else {
+ throw new Error('Specify settings!');
+ }
}
//Getters