Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #15

Merged
merged 3 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ onSelectChange - onSelectChange output event is emitted when ever the selected o

## Code scaffolding

Run `ng generate component component-name --project we` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project we`.
Run `ng generate component component-name --project we-select` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project we-select`.
> Note: Don't forget to add `--project we-select` or else it will be added to the default project in your `angular.json` file.

## Build
Expand Down
49 changes: 43 additions & 6 deletions projects/we-select/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,50 @@
# WeSelect

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.
## we-multi-col-select
![sample usage for multi-col-select](/images/image.png)

### Usage
- Add `WeSelectModule` to the imports array in your module and you can start using the `we-multi-col-select`.

```
<we-multi-col-select
[options]="options"
[containerWidth]="optionsContainerWidth"
[columns]="numberOfColumns"
[disabled]="isDisabled"
[selectedOption]="selectedOption"
(onSelectChange)="onOptionSelect($event)"
>
</we-multi-col-select>
```

### Inputs

options.ts
```
export interface Option{
value: any;
displayText: string;
}
```

optionsContainerWidth - The width of the optionsContainer in pixels. The default width is `500px`.

columns - number of options to be displayed in each row. The entire width of the optionsContainer is equally distributed among the columns. The default value is set to `1`.

disabled - disabled takes a boolean value. The default value is set to `false`.

selectedOption - It allows you to pass a `Option` which should be selected by default.

### Outputs

onSelectChange - onSelectChange output event is emitted when ever the selected option changes. It emits the value property from the selectedOption.


## Code scaffolding

Run `ng generate component component-name --project we-select` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project we-select`.
Run `ng generate component component-name --project we` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project we`.
> Note: Don't forget to add `--project we-select` or else it will be added to the default project in your `angular.json` file.

## Build
Expand All @@ -15,10 +55,7 @@ Run `ng build we-select` to build the project. The build artifacts will be store

After building your library with `ng build we-select`, go to the dist folder `cd dist/we-select` and run `npm publish`.

## Running unit tests

Run `ng test we-select` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Contributions

## Further help
Pull requests are most welcome.

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
2 changes: 1 addition & 1 deletion projects/we-select/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "we-select",
"version": "2.1.11",
"version": "2.1.12",
"peerDependencies": {
"@angular/common": "^14.2.0",
"@angular/core": "^14.2.0"
Expand Down