Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Commit

Permalink
feat: picklist sticky filter 503 (#509)
Browse files Browse the repository at this point in the history
* minor update to release instructions

* feat: pick-list and value-list sticky filter

* add missing styles to valueList for sticky

* remove filterSticky prop

* remove sticky prop
  • Loading branch information
pr3tori4n authored Nov 8, 2019
1 parent 96b15fb commit f6efd78
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ This will provide autocomplete of component names/properties, as well as additio

### Deployment

1. Checkout the master branch. Your git working directory must be clean (no pending un-staged changes).
1. Checkout the master branch. Your git working directory must be clean (no pending un-staged changes). You will also need to have setup a [github release token](https://github.com/medikoo/github-release-from-cc-changelog#prerequisites).
1. Run `npm version <patch | minor | major>`.
Follow semantic versioning. Patch for bug fixes only. Major for breaking changes. Minor for the rest.
1. This will prepare everything for publishing as well as automatically update `CHANGELOG.md`.
Expand Down
5 changes: 5 additions & 0 deletions src/components/calcite-pick-list/calcite-pick-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ header {
justify-content: flex-end;
align-items: center;
margin-bottom: var(--calcite-app-cap-spacing-half);
&.sticky {
position: sticky;
top: 0;
z-index: 1;
}
}

calcite-filter {
Expand Down
4 changes: 4 additions & 0 deletions src/components/calcite-pick-list/resources.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export const CSS = {
sticky: "sticky"
};

export enum ICON_TYPES {
circle = "circle",
square = "square",
Expand Down
3 changes: 2 additions & 1 deletion src/components/calcite-pick-list/shared-list-render.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Host, h } from "@stencil/core";
import CalciteScrim from "../utils/CalciteScrim";
import { VNode } from "@esri/calcite-components/dist/types/stencil.core";
import { CSS } from "./resources";

const renderScrim = (loading, disabled): VNode => {
return loading || disabled ? <CalciteScrim loading={loading}></CalciteScrim> : null;
Expand All @@ -11,7 +12,7 @@ export const List = ({ props, text, ...rest }): VNode => {
const { filterPlaceholder } = text;
return (
<Host aria-disabled={disabled} aria-busy={loading} {...rest}>
<header>
<header class={{ [CSS.sticky]: true }}>
{filterEnabled ? (
<calcite-filter
data={dataForFilter}
Expand Down
5 changes: 5 additions & 0 deletions src/components/calcite-value-list/calcite-value-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ header {
justify-content: flex-end;
align-items: center;
margin-bottom: var(--calcite-app-cap-spacing-quarter);
&.sticky {
position: sticky;
top: 0;
z-index: 1;
}
}

slot[name="menu-actions"]::slotted(calcite-action) {
Expand Down

0 comments on commit f6efd78

Please sign in to comment.