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

Commit

Permalink
feat: removed text node from filter label. (#574)
Browse files Browse the repository at this point in the history
* removed text node from fitler label.

* move TEXT from picklist to filter resources
  • Loading branch information
pr3tori4n authored Nov 22, 2019
1 parent 302a13d commit d53be8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/components/calcite-filter/calcite-filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { Component, Element, Event, EventEmitter, Host, Prop, h } from "@stencil
import { search16, x16 } from "@esri/calcite-ui-icons";
import { debounce, forIn } from "lodash-es";
import CalciteIcon from "../utils/CalciteIcon";
import { CSS } from "./resources";
import { TEXT } from "../calcite-pick-list/resources";
import { CSS, TEXT } from "./resources";

const filterDebounceInMs = 250;

Expand Down Expand Up @@ -111,12 +110,11 @@ export class CalciteFilter {
return (
<Host>
<label>
{this.textLabel}
<input
type="text"
placeholder={this.textPlaceholder}
onInput={this.inputHandler}
aria-label={this.textLabel || "Filter"}
aria-label={this.textLabel || TEXT.filterLabel}
/>
<div class={CSS.searchIcon}>
<CalciteIcon size="16" path={search16} />
Expand Down
4 changes: 4 additions & 0 deletions src/components/calcite-filter/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ export const CSS = {
searchIcon: "search-icon",
clearButton: "clear-button"
};
export const TEXT = {
filterLabel: "filter",
clear: "Clear filter"
};
3 changes: 1 addition & 2 deletions src/components/calcite-pick-list/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ export enum ICON_TYPES {
grip = "grip"
}
export const TEXT = {
filterPlaceholder: "Filter results",
clear: "Clear filter"
filterPlaceholder: "Filter results"
};

0 comments on commit d53be8d

Please sign in to comment.