Skip to content

Commit

Permalink
Add placeholder text for floor selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthik99999 committed Feb 20, 2024
1 parent 7b61ffe commit eeb44f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/routes/(rtdx)/rtdx-rescue/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
function changeMaxFloors(e: Event) {
const dungeon = parseInt((document.getElementById('dungeon') as HTMLSelectElement).value);
const maxFloors = RTDX.Data.dungeons.get(dungeon).floors;
const floor = document.getElementById('floor') as HTMLInputElement;
floor.max = RTDX.Data.dungeons.get(dungeon).floors.toString();
floor.max = maxFloors.toString();
floor.placeholder = `1-${maxFloors}`;
}
</script>

Expand All @@ -46,7 +48,7 @@
</div>
<div class="form-group">
<label for="floor">Floor:</label>
<input type="number" class="form-control" id="floor" min="1" max="3" required>
<input type="number" class="form-control" id="floor" min="1" max="3" placeholder="1-3" required>
</div>
<div class="form-group">
<label for="pokemon">Pokémon:</label>
Expand Down

0 comments on commit eeb44f3

Please sign in to comment.