Closed bupy7 closed 6 years ago
Option attributes is very important feature for Select element. I have added it to one element. Now, we can do follow:
echo (new Select('age', ['10' => 'Teen', 20 => 'Twenty'])->setOptAttributes([10 => ['data-key' => 'some-key']]);
and we got result:
<select name="age"> <option value="10" data-key="some-key">Teen</option> <option value="20">Twenty</option> </select>
It's beaniful, isn't it? =)
Coverage increased (+0.2%) to 95.248% when pulling 5933c7ac2b0c36b6cd1f518598590e5ac93c5779 on bupy7:select-opt-attribute into a2188f252354e4ec3312a673da38529ad15da8cd on adamwathan:master.
Option attributes is very important feature for Select element. I have added it to one element. Now, we can do follow:
and we got result:
It's beaniful, isn't it? =)