Skip to content

Commit

Permalink
Merge pull request #4077 from mathesar-foundation/number_input_text_a…
Browse files Browse the repository at this point in the history
…lign

Left-align text within number inputs
  • Loading branch information
pavish authored Jan 15, 2025
2 parents 47d5613 + 22541d2 commit 74ec921
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
export let formatter: $$Props['formatter'];
export let formatForDisplay: $$Props['formatForDisplay'];
export let useTabularNumbers: $$Props['useTabularNumbers'] = undefined;
$: cssVariables = {
'--input-element-text-align': 'right',
...($$restProps.cssVariables || {}),
};
</script>

<SteppedInputCell
Expand All @@ -41,7 +36,6 @@
{...$$restProps}
bind:value
{formatter}
{cssVariables}
on:blur={handleInputBlur}
on:keydown={handleInputKeydown}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,11 @@
childValue = getNewChildValue(newParentValue);
}
$: handleParentValueChange(parentValue);
$: cssVariables = {
'--input-element-text-align': 'right',
...($$restProps.cssVariables || {}),
};
</script>

<StringifiedNumberInput
{...$$restProps}
value={childValue}
{cssVariables}
on:blur
on:focus
on:keydown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,11 @@
childValue = getNewChildValue(newParentValue);
}
$: handleParentValueChange(parentValue);
$: cssVariables = {
'--input-element-text-align': 'right',
...($$restProps.cssVariables || {}),
};
</script>

<StringifiedNumberInput
{...$$restProps}
value={childValue}
{cssVariables}
on:blur
on:focus
on:keydown
Expand Down

0 comments on commit 74ec921

Please sign in to comment.