MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / buttonsChanged

Method buttonsChanged

core/src/components/alert/alert.tsx:303–315  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301
302 @Watch('buttons')
303 buttonsChanged() {
304 const buttons = this.buttons;
305 this.processedButtons = buttons.map((btn) => {
306 return typeof btn === 'string' ? { text: btn, role: btn.toLowerCase() === 'cancel' ? 'cancel' : undefined } : btn;
307 });
308 /**
309 * Reset wrap state so the new button set can be re-evaluated. Without this,
310 * a previously-latched vertical layout would persist even if the new buttons
311 * fit horizontally.
312 */
313 this.isButtonGroupWrapped = false;
314 this.checkButtonGroupWrap();
315 }
316
317 @Watch('inputs')
318 inputsChanged() {

Callers 1

componentWillLoadMethod · 0.95

Calls 1

checkButtonGroupWrapMethod · 0.95

Tested by

no test coverage detected