Skip to content
Advertisement

How to filter numbers in a drop down list?

I have an HTML table with a numeric variable called statut.

The statut variable is a drop-down list, it has two values -> 1 and 9.

The method in typescript seems to be correct

JavaScript

I think my problem is the HTML, how to make the HTML know that it must filter a number and not a string?

JavaScript

Thank you for your help.

Advertisement

Answer

Casting this.selectedBrand to a number should work. The + will do the trick here.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement