Skip to content

Commit d271c04

Browse files
committed
Change attributes with if condition
1 parent 5b9bfed commit d271c04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Compiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class Compiler
108108
/**
109109
* @var string[]
110110
*/
111-
protected $ifAttributes = ['checked', 'selected'];
111+
protected $ifAttributes = ['checked', 'selected', 'disabled'];
112112

113113

114114

@@ -1294,7 +1294,7 @@ private function replaceAttributeWithIfConditionPlaceholders(string $html): stri
12941294
$name = $match[1];
12951295
$value = base64_decode($match[2]);
12961296
$condition = trim(str_replace(['__DOUBLE_CURLY_OPEN__', '__DOUBLE_CURLY_CLOSE__'], '', $value));
1297-
if (in_array($name, ['checked', 'selected'])) {
1297+
if (in_array($name, ['checked', 'selected', 'disabled'])) {
12981298
$value = $name;
12991299
}
13001300
$html = str_replace(

0 commit comments

Comments
 (0)