Skip to content

Commit

Permalink
Added formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniket Singh Rawat committed Dec 3, 2023
1 parent f95e320 commit 318feeb
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
export let isSelectedInRange: $$Props['isSelectedInRange'];
export let value: $$Props['value'];
export let disabled: $$Props['disabled'];
export let searchValue: $$Props['searchValue'] = undefined;
export let isIndependentOfSheet: $$Props['isIndependentOfSheet'];
export let showTruncationPopover: $$Props['showTruncationPopover'] = false;
export let type: $$Props['type'];
Expand All @@ -17,13 +18,19 @@
export let timeShow24Hr: $$Props['timeShow24Hr'] = true;
export let timeEnableSeconds: $$Props['timeEnableSeconds'] = true;
export let formatForDisplay: $$Props['formatForDisplay'];
let formattedValue = value ? formatter.parseAndFormat(value) : value;
const formattedSearchValue =
typeof searchValue === 'string'
? formatter.parseAndFormat(searchValue)
: searchValue;
</script>

<SteppedInputCell
bind:value
bind:value={formattedValue}
{isActive}
{isSelectedInRange}
{disabled}
searchValue={formattedSearchValue}
highlightSubstringMatches={false}
{isIndependentOfSheet}
{showTruncationPopover}
Expand Down

0 comments on commit 318feeb

Please sign in to comment.