mirror of
https://github.com/getredash/redash.git
synced 2026-03-21 16:00:09 -04:00
* Prettier all the JS files * Add GitHub Action to autoformat code pushed to master * Fix eslint violation due to formatting. * Remove GitHub actions for styling * Add restyled.io config
21 lines
486 B
JavaScript
21 lines
486 B
JavaScript
import { toString, isEmpty } from "lodash";
|
|
import { Parameter } from ".";
|
|
|
|
class TextParameter extends Parameter {
|
|
constructor(parameter, parentQueryId) {
|
|
super(parameter, parentQueryId);
|
|
this.setValue(parameter.value);
|
|
}
|
|
|
|
// eslint-disable-next-line class-methods-use-this
|
|
normalizeValue(value) {
|
|
const normalizedValue = toString(value);
|
|
if (isEmpty(normalizedValue)) {
|
|
return null;
|
|
}
|
|
return normalizedValue;
|
|
}
|
|
}
|
|
|
|
export default TextParameter;
|