Enterprise-ng: [ng Modal dialog] option to disable buttons

Created on 7 May 2019  路  5Comments  路  Source: infor-design/enterprise-ng

Current behavior
On the current behavior, buttons can define on initializing of modal, can apply click callback event, setting a text and default

Acceptance Criteria
Looking for modal option that can control the behavior(disable/enable) buttons and applicable on runtime changes.

Describe alternatives you've considered
A property option to be assigned on the when defining buttons

const buttonSave = { // defining modal buttons 
    isDisabled: true/false, // boolean property
    text: ...,
    click: ...,
    isDefault: ...
}
modalInstance.buttons(buttonSave); // assigning modal buttons

Sample Screenshots
image

cc: @tmcconechy, @bthharper

[8] WFM landmark type

Most helpful comment

To add to this it should be possible to pass more attributes in to the button collection if this lein was changed you could pass disabled: true to the button list on the component.

https://github.com/infor-design/enterprise/blob/master/src/components/modal/modal.js#L466

Suggest doing this in addition to an API to get to the buttons.

All 5 comments

@tmcconechy - can you specify an id for the buttons?, then they can be queried? If do then the standard API on the EP controls would work. As for exposing them in NG, that would be more tricky.

Yes, would have to expose them on the EP side. I'll take a look when i get a chance.

Landmark needs this as well. A feature we would especially like is getting a collection of the buttons and having a standard api for enabling and disabling them.

To add to this it should be possible to pass more attributes in to the button collection if this lein was changed you could pass disabled: true to the button list on the component.

https://github.com/infor-design/enterprise/blob/master/src/components/modal/modal.js#L466

Suggest doing this in addition to an API to get to the buttons.

This issue is now resolved. Moving this ticket to the Done column.

Was this page helpful?
0 / 5 - 0 ratings