Skip to content

feature/Modal observes changes#334

Merged
romaninsh merged 1 commit intodevelopfrom
feature/modal-observeChanges
Jan 17, 2018
Merged

feature/Modal observes changes#334
romaninsh merged 1 commit intodevelopfrom
feature/modal-observeChanges

Conversation

@ibelar
Copy link
Copy Markdown
Contributor

@ibelar ibelar commented Jan 16, 2018

New method Modal::observeChanges()

Shortcut method to add observeChanges setting in semantic-ui modal.
observesChange setting allow for re positioning when DOM content changes in modal.

See example in issue: #324

add method observeChanges()
@romaninsh romaninsh merged commit 5cb9bd8 into develop Jan 17, 2018
@romaninsh romaninsh deleted the feature/modal-observeChanges branch January 17, 2018 12:29
*/
public function observeChanges()
{
$this->setOptions(['observeChanges' => true]);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @lubber-de, when is observeChanges: false helpful? Are there any negative performance/functional implications when set observeChanges: true by default?

the only related discussion I found: fomantic/Fomantic-UI#564

Copy link
Copy Markdown

@lubber-de lubber-de Oct 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

observeChanges is also helpful if your code possibly changes input fields (adding/removing) to make sure focus trap will remain working. fomantic/Fomantic-UI#2036
If setting this to true by default might has a signifant performance impact depends on how complex your code/Dom is.
https://stackoverflow.com/questions/31659567/performance-of-mutationobserver-to-detect-nodes-in-entire-dom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants