Skip to content

Fix to enable data- attributes to be parsed correctly#10368

Merged
danharrin merged 5 commits into
filamentphp:3.xfrom
titantwentyone:fix/data-attributes
Dec 19, 2023
Merged

Fix to enable data- attributes to be parsed correctly#10368
danharrin merged 5 commits into
filamentphp:3.xfrom
titantwentyone:fix/data-attributes

Conversation

@titantwentyone
Copy link
Copy Markdown
Contributor

Description

Currently the following results in two attributes being output on the target element. One being incorrect:

TextInput('something')
   ->extraAttributes(['data-foo' => 'bar']);

//Results in...
<div...
   datafoo='bar'
   data-foo='bar'
>

PR includes tests for basic html attributes, alpine attributes and data attributes.

  • Visual changes (if any) are shown using screenshots/recordings of before and after.

Before PR:
image

After PR:
image

  • composer cs command has been run.
  • Changes have been tested.
  • Documentation is up-to-date.

Comment thread tests/src/Support/helpersTest.php Outdated
@danharrin danharrin added the bug Something isn't working label Dec 19, 2023
@danharrin danharrin added this to the v3 milestone Dec 19, 2023
@danharrin danharrin merged commit 2566cc3 into filamentphp:3.x Dec 19, 2023
@danharrin
Copy link
Copy Markdown
Member

Thanks

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

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants