Fix form date time field right border when variable picker is provided and field is readonly (#9600)
This commit is contained in:
committed by
GitHub
parent
f151963e66
commit
4719fe6ed9
@ -333,7 +333,7 @@ export const FormDateTimeFieldInput = ({
|
|||||||
<FormFieldInputRowContainer>
|
<FormFieldInputRowContainer>
|
||||||
<StyledInputContainer
|
<StyledInputContainer
|
||||||
ref={datePickerWrapperRef}
|
ref={datePickerWrapperRef}
|
||||||
hasRightElement={isDefined(VariablePicker)}
|
hasRightElement={isDefined(VariablePicker) && !readonly}
|
||||||
>
|
>
|
||||||
{draftValue.type === 'static' ? (
|
{draftValue.type === 'static' ? (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@ -396,6 +396,17 @@ export const DisabledWithVariable: Story = {
|
|||||||
defaultValue: `{{a.b.c}}`,
|
defaultValue: `{{a.b.c}}`,
|
||||||
onPersist: fn(),
|
onPersist: fn(),
|
||||||
readonly: true,
|
readonly: true,
|
||||||
|
VariablePicker: ({ onVariableSelect }) => {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
onVariableSelect('{{test}}');
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Add variable
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
play: async ({ canvasElement }) => {
|
play: async ({ canvasElement }) => {
|
||||||
const canvas = within(canvasElement);
|
const canvas = within(canvasElement);
|
||||||
|
|||||||
@ -427,6 +427,17 @@ export const DisabledWithVariable: Story = {
|
|||||||
defaultValue: `{{a.b.c}}`,
|
defaultValue: `{{a.b.c}}`,
|
||||||
onPersist: fn(),
|
onPersist: fn(),
|
||||||
readonly: true,
|
readonly: true,
|
||||||
|
VariablePicker: ({ onVariableSelect }) => {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
onVariableSelect('{{test}}');
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Add variable
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
play: async ({ canvasElement }) => {
|
play: async ({ canvasElement }) => {
|
||||||
const canvas = within(canvasElement);
|
const canvas = within(canvasElement);
|
||||||
|
|||||||
Reference in New Issue
Block a user