shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 242 forks source link

Adds datalistId for prompt modals #351

Closed aeisenberg closed 7 years ago

aeisenberg commented 7 years ago

This PR is for issue #350.

The datalistId points to an id of a element. The options of this datalist element are used as the list attribute in the element of a prompt dialog. Use it like this:

In your component template:

<datalist id="my-list"><option value="1"><option value="2"></datalist>

In your component js:

modal.prompt()
  .datalistId('my-list')
  .size('lg')
  .isBlocking(true)
  .showClose(true)
  .keyboard(27)
  .title('Hello World')
  .body('A Customized Modal')
  .open();

This adds options 1 and 2 as elements of the modal.

shlomiassaf commented 7 years ago

Hi, Thanks for the support! I appreciate it.

I'll have to close this one, more info in this issue-comment on the original issue.