Skip to content

Commit

Permalink
Fixed issues with slim-select v2 redrawing
Browse files Browse the repository at this point in the history
Included adding CSS and use of contentLocation setting to fix modal issue.
Cant unpick into separate commits due to merge issues.
  • Loading branch information
scudderk committed Apr 28, 2023
1 parent 7cfec82 commit ee7dba1
Show file tree
Hide file tree
Showing 7 changed files with 1,634 additions and 67 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ All notable changes to the slim-select-prefabs library will be documented in thi
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.2.2] - 2023-04-27

### Fixed
- Replaced settings constant by repeating settings code for each function. Not as efficient but the slim-select documentation has not been updated for version 2 yet so until I know what settings have changed I am not comfortable using them.
- Class added to contentLocation `div` for consistent styling.

## [2.2.1] - 2023-04-27

### Changed
- Search highlighting added to all dropdowns
- Search placeholder added to all dropdowns
- Search text added to all dropdowns
- Drpodown placeholder added to all dropdowns

### Fixed
- Changes to slim-select required rewrites of `ddlClientInitialise()` and `ddlClientContactInitialise()` to redraw them on `select` element updates.

## [2.1.1] - 2023-04-21

### Added
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ A collection of slim-select prefabs
### NPM
`npm i slim-select-prefabs`
### CDN
`<script src="https://unpkg.com/slim-select-prefabs/dist/index.js"></script>`
`<script src="https://unpkg.com/slim-select-prefabs/dist/index.min.js"></script>`
`<link href="https://unpkg.com/slim-select-prefabs/dist/site.css"></link>`

## Usage
### Client
Expand Down Expand Up @@ -71,3 +72,9 @@ import { ddlGenericInitialise } from 'slim-select-prefabs'
ddlGenericInitialise()
```
## Style
If you are using SCSS you can import the styles into your SCSS file with
```
@import "node_modules/slim-select-prefabs/dist/site.css";
```
17 changes: 17 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
var gulp = require("gulp");
var minify = require("gulp-minify");
var rename = require("gulp-rename");
const sass = require("gulp-sass")(require("sass"));
const cleanCSS = require("gulp-clean-css");
const sourcemaps = require("gulp-sourcemaps");
const newer = require("gulp-newer");

gulp.task("pack-js", function () {
return gulp
Expand All @@ -9,3 +13,16 @@ gulp.task("pack-js", function () {
.pipe(rename("index.min.js"))
.pipe(gulp.dest("dist"));
});

gulp.task("sass-site", () =>
gulp
.src("./src/css/site.scss")
.pipe(sourcemaps.init())
.pipe(sass({ outputStyle: "compressed" }).on("error", sass.logError))
.pipe(cleanCSS({ compatibility: "ie8" }))
.pipe(sourcemaps.write("./dist"))
.pipe(newer("./dist"))
.pipe(gulp.dest("./dist"))
);

gulp.task("default", gulp.series("pack-js", "sass-site"));

0 comments on commit ee7dba1

Please sign in to comment.