|
|
|
@ -59,12 +59,15 @@ export const TextDimensionEditor: FC<StandardEditorProps<TextDimensionConfig, Te |
|
|
|
|
...value, |
|
|
|
|
fixed, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
setRefresh(refresh + 1); |
|
|
|
|
}, |
|
|
|
|
[onChange, refresh, value] |
|
|
|
|
[onChange, value] |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
const onClearFixed = () => { |
|
|
|
|
onFixedChange(''); |
|
|
|
|
setRefresh(refresh + 1); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const mode = value?.mode ?? TextDimensionMode.Fixed; |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
@ -95,9 +98,7 @@ export const TextDimensionEditor: FC<StandardEditorProps<TextDimensionConfig, Te |
|
|
|
|
onChange={onFixedChange} |
|
|
|
|
item={dummyStringSettings} |
|
|
|
|
suffix={ |
|
|
|
|
value?.fixed && ( |
|
|
|
|
<Button icon="times" variant="secondary" fill="text" size="sm" onClick={() => onFixedChange('')} /> |
|
|
|
|
) |
|
|
|
|
value?.fixed && <Button icon="times" variant="secondary" fill="text" size="sm" onClick={onClearFixed} /> |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</InlineField> |
|
|
|
|