make placeholders overwritable

This commit is contained in:
Eduard Heimbuch
2020-11-03 13:30:00 +01:00
parent 9c96445b7a
commit 2f87afdbc2

View File

@@ -30,6 +30,7 @@ type Props = WithTranslation & {
filter: (p: string) => void;
value?: string;
testId?: string;
placeholder?: string;
};
type State = {
@@ -70,14 +71,14 @@ class FilterInput extends React.Component<Props, State> {
};
render() {
const { t, testId } = this.props;
const { t, testId, placeholder } = this.props;
return (
<form className="input-field" onSubmit={this.handleSubmit} {...createAttributesForTesting(testId)}>
<div className="control has-icons-left">
<FixedHeightInput
className="input"
type="search"
placeholder={t("filterEntries")}
placeholder={placeholder || t("filterEntries")}
value={this.state.value}
onChange={this.handleChange}
/>