-
Notifications
You must be signed in to change notification settings - Fork 208
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
Question: Is there a way to start in collapse() state? #327
Comments
If the button is inside the status bar split area it means once clicked the split area is already rendered and the view child should be populated. |
I forgot the details because it was long time ago. But It boils down to this feature request:
|
Can you please explain the benefits of collapsed? You can start with specific size for that split-area or if split drag is not needed why is it a part of the splitter? |
the idea is that it starts in collapsed state as a statusbar showing some information. The collapsed state size has to be set to a fixed height because of the content it has to display. the user must not be able to drag the size of it. but the user can click on this statusbar. then it expands to a bigger area that the user can increase/reduce in size. This bigger area shows a table with log messages. The user can then click a button to collapse it again to become the fixed height statusbar again. So we have to states:
|
Isn't it actually lock size? You start with size X locked. Once button clicked you resize to size Y and unlock. Or do you want the gutter to look different in each case? Anyway this requires changing the size of a specific area and aligning others as if the user dragged but from code which I am pretty sure doesn't exist now. Starting in collapsed state isn't supported now indeed. I would like to evaluate how collapse works today and if this is the desired behavior before adding this feature as locking seems more correct here and I would expect collapse to shrink to zero with gutter still available for resize. |
for the status bar the gutter shouldnt be visible while it should be visible for the resizable log table area. But i dont know what lock size means, maybe i missed a feature. |
update 2:
okay, It is not directly a problem with angular-split.
The reason in my project is that when the component is created the
<as-split>
is hidden by *ngif. Because of that initializing it does not work in ngOnInit or ngAfterViewChild because that is too early as the ngif is still false until the user is pressing some buttons. I cannot remove that ngif and will have to find a different workaround.would be nice to have something liek that
<as-split-area collapse="20" size="400">
to initialize the as-split-area with collapse(20) to prevent problems like that.update
i think i found the issue. I think it is caused by *ngif which prevents the split component to be loaded on startup and thus it is undefined in ngOnInit and ngAfterViewChild. I have to check that and will update this issue again, if that is the case. A classical case of not getting something to work for a whole day. Then finally writing an issue and instantly after writing it, having an idea which could solve it....
original issue
Is your feature request related to a problem? Please describe.
That is not really a feature request i think, but rather a question whether this is already possible
What I want:
<as-split unit="pixel" direction="vertical" useTransition="true" gutterSize="5">
<as-split-area size="*">
<as-split-area #myStatusBar size="400" minSize="150" >
@ViewChild('myStatusBar', { read: SplitAreaDirective, static: false }) myStatusBar!: SplitAreaDirective;
this.myStatusBar.expand()
this.myStatusBar.collapse(60)
My Problem:
this.myStatusBar.collapse(60);
in ngOnInit() and ngAfterViewInit() but it still stays expanded on startup.by the way, the package is really awesome. It helped me a lot in creating a flexibel UI so far :)
The text was updated successfully, but these errors were encountered: