#Is it possible to make a dropdown from material UI dynamic?
55 messages · Page 1 of 1 (latest)
https://material.angular.io/components/select/examples if you look at their example they used an array with *ngFor to fill the Select dropdown with options
can i get a list from a database and display it in my dropdown?
Yes, but first you need to get the data from your database to Angular (Angular is a frontend framework)
yes i know, what part of the examples i should use?
i was asking if its possible because while using material ui i cannot a good examples how to display the data to my dropdown
I created this example for you I hope it helps
So I got the data from the server side as JSON file I parse it into an array and I displayed the array on Select dropdown
@autumn vault
oh that's nice, can we have it like filter as I type a name? like if I typed assunta only assunta will show in the dropdown
I am new this so i need a bit help
but it maked sense now
@slow maple
for this I think you should use this https://material.angular.io/components/autocomplete/examples
what i need can be done with the example you made right?
do i just replace the dropdown with that right?
can you do it in that stackblitz app?
I think you would be able to do it yourself. Just try to play with it and search.
oh okay thankyou!
hello @slow maple i had some errors while making this
i really need this today
can you please help me
i tried to make it on my local machine
but no luck 😦
i just can't understand how to inject the data from the server to my autocomplete dropdown search 😦
pleasee bro 😦
what are the errors?
They can't bit to the input and mat autocomplete does't show up instead it show's error
what i did it
is
i copy the autocomplete and copied the ngfor statement and the values
please show the error.
and the user.firstname to userlast name
sure ill replicate it on stackblitz
there its on stackblitz
its on the one you sent
i need to also have a dropdown search thing just like you example but i can type
@slow maple
let me check it might be the imports but you can chech
check
naw
it doest work
@slow maple
@slow maple i dont know how to add the input it has an error on the formcontrol and matautocomplete
Hello @slow maple any updates? 😦