Fixed docs

This commit is contained in:
Макс Овсяников 2023-01-24 20:10:53 +03:00
parent b1c1b5e9ce
commit 05e2e1ee86
6 changed files with 11 additions and 8 deletions

View File

@ -21,7 +21,11 @@ Tested in JS and React. Errors in work in React applications are revealed.
- Fixed display of the example page on mobile devices. - Fixed display of the example page on mobile devices.
- Updated documentation! - Updated documentation!
### 00.00.2023 - update 0.2.1 ### 20.01.2023 - update 0.2.1
- All select rewritten to ts. - All select rewritten to ts.
- Fixed bugs and shortcomings. - Fixed bugs and shortcomings.
### 24.01.2023 - fix 0.2.2
- Fixed documentation etc.

View File

@ -1,6 +1,6 @@
# CG-SELECT # CG-SELECT
## version ~ 0.2.1 ## version ~ 0.2.2
This component allows you to create a custom select. It offers more flexible customization and use of select. 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. Customization, multi-selection and live search by elements are available.
@ -45,7 +45,7 @@ npm i cg-select
### An example of creating a regular select. ### An example of creating a regular select.
```javascript ```javascript
import { CGSelect } from 'cg-select'; import CGSelect from 'cg-select';
const dropdown = new CGSelect({ const dropdown = new CGSelect({
selector: '.cg-dropdown_selector', selector: '.cg-dropdown_selector',

View File

@ -61,7 +61,7 @@
</a> </a>
<a href="#version--021" id="version--021" style="color: inherit; text-decoration: none"> <a href="#version--021" id="version--021" style="color: inherit; text-decoration: none">
<h2>version ~ 0.2.1</h2> <h2>version ~ 0.2.2</h2>
</a> </a>
<p> <p>
This component allows you to create a custom select. It offers more flexible This component allows you to create a custom select. It offers more flexible
@ -138,7 +138,7 @@
> >
<h3>An example of creating a regular select.</h3> <h3>An example of creating a regular select.</h3>
</a> </a>
<pre><code class="language-javascript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-0">CGSelect</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&#39;cg-select&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">dropdown</span><span class="hl-1"> = </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-7">CGSelect</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-0">selector:</span><span class="hl-1"> </span><span class="hl-2">&#39;.cg-dropdown_selector&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">placeholder:</span><span class="hl-1"> </span><span class="hl-2">&#39;Выберите авто&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">items:</span><span class="hl-1"> [</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;BMW&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-0">id:</span><span class="hl-1"> </span><span class="hl-2">&#39;213sade&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">title:</span><span class="hl-1"> </span><span class="hl-2">&#39;Opel&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">value:</span><span class="hl-1"> </span><span class="hl-8">1</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;Mersedes&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;MAN&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;Ferari&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1">});</span> <pre><code class="language-javascript"><span class="hl-4">import</span><span class="hl-1"> </span><span class="hl-0">CGSelect</span><span class="hl-1"> </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&#39;cg-select&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">dropdown</span><span class="hl-1"> = </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-7">CGSelect</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-0">selector:</span><span class="hl-1"> </span><span class="hl-2">&#39;.cg-dropdown_selector&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">placeholder:</span><span class="hl-1"> </span><span class="hl-2">&#39;Выберите авто&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">items:</span><span class="hl-1"> [</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;BMW&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-0">id:</span><span class="hl-1"> </span><span class="hl-2">&#39;213sade&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">title:</span><span class="hl-1"> </span><span class="hl-2">&#39;Opel&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">value:</span><span class="hl-1"> </span><span class="hl-8">1</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;Mersedes&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;MAN&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;Ferari&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1">});</span>
</code></pre> </code></pre>
<a <a

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "cg-select", "name": "cg-select",
"version": "0.2.1", "version": "0.2.2",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {

View File

@ -1,6 +1,6 @@
{ {
"name": "cg-select", "name": "cg-select",
"version": "0.2.1", "version": "0.2.2",
"description": "Feature rich Select control for React/JS with multiselect, autocomplete and styling", "description": "Feature rich Select control for React/JS with multiselect, autocomplete and styling",
"author": { "author": {
"name": "CraftGroup", "name": "CraftGroup",

View File

@ -378,7 +378,6 @@ export class CGSelect implements ICgSelect {
private async renderUrl() { private async renderUrl() {
const response = await fetch(this.url!); const response = await fetch(this.url!);
const dataUrl = await response.json(); const dataUrl = await response.json();
console.log(dataUrl);
const nativeSelect = createNativeSelect(); const nativeSelect = createNativeSelect();