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

Not possible to set an id attribute on allotment component #751

Closed
Maximuschka opened this issue Jan 5, 2024 · 2 comments · Fixed by #752
Closed

Not possible to set an id attribute on allotment component #751

Maximuschka opened this issue Jan 5, 2024 · 2 comments · Fixed by #752
Assignees

Comments

@Maximuschka
Copy link

Good day!

For the purpose of automated UI testing, I am looking for a way to set dedicated id attribute on the allotment component. Preferably, I'd set it directly on the React component like this:

<Allotment
  id={id}
  className={css}
  separator={false}
  onDragEnd={(sizes) => this.onDragEnd(sizes)}
  onChange={(sizes) => this.onChange(sizes)}>
  {...}
</Allotment>

to then receive the html attribute on the div with class "split-view" (most outer container).

  • Am I missing the correct configuration option?
  • What would be your recommended way to achieve this? I would prefer to not use jQuery.

Thanks and best regards,
Max

@johnwalley johnwalley linked a pull request Jan 5, 2024 that will close this issue
@johnwalley
Copy link
Owner

Good spot. I've created #752 which is a straightforward change so I'll publish a new release when I get a spare few minutes.

@johnwalley
Copy link
Owner

@johnwalley johnwalley self-assigned this Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants