-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(dialog): add default value to prompt preset. #7090
feat(dialog): add default value to prompt preset. #7090
Conversation
@@ -521,7 +522,8 @@ function MdDialogProvider($$interimElementProvider) { | |||
' <p>{{::dialog.mdTextContent}}</p>', | |||
' </div>', | |||
' <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devversion should this be changed to ===
instead of ==
while you're in the area?
PR looks good, thanks for doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zbjornson The IDE's and Linters are throwing a warning when using that.
df9091e
to
09d1765
Compare
@@ -383,6 +383,7 @@ function MdDialogDirective($$rAF, $mdTheming, $mdDialog) { | |||
* - $mdDialogPreset#title(string) - Sets the prompt title. | |||
* - $mdDialogPreset#textContent(string) - Sets the prompt message. | |||
* - $mdDialogPreset#htmlContent(string) - Sets the prompt message as HTML. Requires ngSanitize | |||
* - $mdDialogPreset#defaultValue(string) - Sets the default value for the prompt input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong position, you accidentally spliced the line above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thank you 👍
09d1765
to
f4c9822
Compare
@@ -503,7 +504,7 @@ function MdDialogProvider($$interimElementProvider) { | |||
options: advancedDialogOptions | |||
}) | |||
.addPreset('prompt', { | |||
methods: ['title', 'htmlContent', 'textContent', 'content', 'placeholder', 'ariaLabel', | |||
methods: ['title', 'htmlContent', 'textContent', 'defaultValue', 'content', 'placeholder', 'ariaLabel', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think initialValue
is a better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I respected the window.prompt
reference here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThomasBurleson Finally updated. Sorry for the delay ;)
f4c9822
to
c3bb7e0
Compare
Fixes #7046