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

[API] GetChildElementById doesn't work with Card #1406

Closed
jerone opened this issue Sep 22, 2024 · 2 comments · Fixed by #1429
Closed

[API] GetChildElementById doesn't work with Card #1406

jerone opened this issue Sep 22, 2024 · 2 comments · Fixed by #1429
Labels
app-kind:GUI bug Something isn't working untriaged

Comments

@jerone
Copy link
Contributor

jerone commented Sep 22, 2024

Current behavior

GetChildElementById is not able to find element for pane children within the SplitGrid.

It works for any other child.

How to reproduce it

public UIToolView View
{
    get
    {
        return new UIToolView(
            SplitGrid()
              .WithLeftPaneChild(Button("custom-id-1"))
              .WithRightPaneChild(DataGrid("custom-id-2"))
        );
    }
 }
var element1 = Gui.View.GetChildElementById("custom-id-1"); // null
var element2 = Gui.View.GetChildElementById("custom-id-2"); // null

Expected behavior

Expect element with id to be found within SplitGrid.

Affected DevToys kind

DevToys (app with GUI)

DevToys Version

Version 2.0-preview.5

@jerone jerone added bug Something isn't working untriaged labels Sep 22, 2024
@jerone
Copy link
Contributor Author

jerone commented Oct 27, 2024

After some more investigation, it's actually not SplitGrid that doesn't work, but Card that is not able to iterate through UIElement property.

I'm working on a fix.

@jerone jerone changed the title [API] GetChildElementById doesn't work with SplitGrid [API] GetChildElementById doesn't work with Card Oct 27, 2024
jerone added a commit to jerone/DevToys that referenced this issue Oct 27, 2024
@veler
Copy link
Collaborator

veler commented Oct 27, 2024

Great catch! Thank you for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-kind:GUI bug Something isn't working untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants