mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
Canvas: Unable to add fixed text in textbox element #53080
This commit is contained in:
parent
5fb778814c
commit
c00c8db13c
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user