add Sort Function

This commit is contained in:
2025-07-16 07:59:12 +08:00
parent 0192f7eeec
commit 5b8c44f494
6 changed files with 182 additions and 60 deletions

View File

@@ -2,7 +2,8 @@
export let value: number = 0; // The raw number
export let label: string = ""; // Field label
export let onInput: (() => void) | null = null; // Optional extra handler
export let disabled: boolean = false;
export let className: string = "";
let formatted = "";
// Format whenever value changes
@@ -26,7 +27,8 @@
<input
type="text"
bind:value={formatted}
placeholder="Rp 0"
placeholder="Rp 0"
class="w-full border p-2 rounded ${className}"
on:input={handleInput}
disabled={disabled}
/>