Closed LAMaglan closed 3 months ago
Address https://github.com/LAMaglan/PokeFightSimulator/issues/28
The fullPokemonList variable is introduced to store the complete list of Pokemon names once they're fetched. The filterDatalist function is added to handle updating the based on the current input value. This function checks if each Pokemon name starts with the input value (ignoring case) and creates an only for those that match. Two event listeners are attached to the input fields for the input event. These listeners call filterDatalist whenever the user types or deletes characters in the field. After the full list of Pokemon names is fetched, filterDatalist is called to initially populate each with all names.
Address https://github.com/LAMaglan/PokeFightSimulator/issues/28
The fullPokemonList variable is introduced to store the complete list of Pokemon names once they're fetched. The filterDatalist function is added to handle updating the