Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Apr 9, 2022

Conversation

mvorisek
Copy link
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

@@ -29,7 +29,7 @@ protected function initQuickNewRecord()

$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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant