Skip to content

Add/remove specific HTML class /w "class.xxx" seed#1770

Merged
mvorisek merged 1 commit intodevelopfrom
add_remove_class_using_dotted_seed
Apr 9, 2022
Merged

Add/remove specific HTML class /w "class.xxx" seed#1770
mvorisek merged 1 commit intodevelopfrom
add_remove_class_using_dotted_seed

Conversation

@mvorisek
Copy link
Copy Markdown
Member

@mvorisek mvorisek commented Apr 9, 2022

related with atk4/core#206

also much safer, as invalid seeds with bool values for non-existent keys will throw now

$buttonSeed = is_string($buttonSeed) ? ['content' => $buttonSeed] : $buttonSeed;

$defaultSeed = [\Atk4\Ui\Button::class, 'disabled' => ($this->disabled || $this->readonly)];
$defaultSeed = [\Atk4\Ui\Button::class, 'class.disabled' => ($this->disabled || $this->readonly)];
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

⚠️ be careful, some components like Atk4\Ui\Form\Control has native disabled property

@mvorisek mvorisek merged commit 1960674 into develop Apr 9, 2022
@mvorisek mvorisek deleted the add_remove_class_using_dotted_seed branch April 9, 2022 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant