Skip to content

Commit

Permalink
fix: experimental filters helper text and empty input bugs (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw authored Jul 26, 2023
1 parent 7173eda commit a754015
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
},
plugins: ["react", "@typescript-eslint", "react-hooks", "import"],
rules: {
"no-console": "error",
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ const defaultValue = [
{
value: { value: "discount", label: "Release date", type: "4" },
condition: {
options: [{ value: "input-1", label: "between", type: "date.range" }],
options: [{ value: "input-1", label: "between", type: "number.range" }],
selected: {
conditionValue: {
value: "input-1",
label: "between",
type: "date.range",
type: "number.range",
},
value: ["0", "1"],
},
Expand Down Expand Up @@ -302,9 +302,8 @@ export const Error = () => {
value={defaultValue}
error={[
{
row: 0,
row: 8,
rightText: "Some error here",
leftText: "Some error here",
},
{
row: 2,
Expand Down
8 changes: 4 additions & 4 deletions src/components/ExperimentalFilters/RightOperator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const RightOperator = ({
}}
type="number"
error={!!error}
helperText={error}
helperText={helperText}
disabled={disabled}
width="100%"
/>
Expand Down Expand Up @@ -203,7 +203,7 @@ export const RightOperator = ({
}}
type="date"
error={!!error}
helperText={error}
helperText={helperText}
disabled={disabled}
width="100%"
/>
Expand All @@ -221,13 +221,13 @@ export const RightOperator = ({
}}
type="datetime-local"
error={!!error}
helperText={error}
helperText={helperText}
disabled={disabled}
width="100%"
/>
</RangeInputWrapper>
);
}

return <Input disabled />;
return <Input disabled value={selected.value} />;
};

2 comments on commit a754015

@vercel
Copy link

@vercel vercel bot commented on a754015 Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on a754015 Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

macaw-ui – ./legacy

macaw-ui-git-canary-saleorcommerce.vercel.app
macaw-ui-saleorcommerce.vercel.app
macaw-ui.vercel.app

Please sign in to comment.