Closed adithewonderboy closed 3 years ago
Hello,
Any updates on this? Thank you!
Hi @adithewonderboy. I agree if we have visible for tab we can solve this problem. But @aocneanu can decide on it.
@adithewonderboy,
To hide tabs directly is more complicated because in the current JSON template the tabs are not defined in the tree, they are only defined as props.
We will add the hidden property to sections and we will be able to control tab visibility by controlling the sections' visibility.
That's great, Thank you @aocneanu!
@raftx24 will close this once the feature is implemented.
@adithewonderboy please test with the latest release
Hi @aocneanu,
I updated now enso code and hiding of the sections works as expected, but hiding the form fields is not working anymore for me. Is it because I'll need to wait for the official new release or is it another bug?
Thank you!
Ok, so diving deeper into this on our side, I found some small issues in our code but what really baffles me is that I don't get the yarn update / enso releases system.
I have forcefully update to enso-ui/forms@2.3.6, although package.json stated initially on dependencies: "@enso-ui/forms": "^2.3.5" (so compatible with...), and I still don't find the changes done here:
@raftx24 - adds section visibility (ref #28) - a17cca9
Even on master https://github.com/enso-ui/forms/tree/v2.3.6 I don't see these changes.
Later edit: I see that a17cca9 is part of the 2.3.4 tag, and not present anymore in 2.3.5, 2.3.6, or 2.3.7.
This is a bug.
Prerequisites
Description
Cannot hide a form tab that contains a slot
Steps to Reproduce
...{ "tab": "Devices", "columns": "slot", "slot": "devices", "fields": [] },...
this.$refs.form.hideTab('Devices');
Expected behavior
The tab should be hidden from the form. This works for other tabs which contains some fields inside them.
Actual behavior
The tab is still visible after the form is shown.
Maybe it's a good idea to extend the show/hide functionality for tabs like you did for columns inside tabels with "isVisible" property.. I saw in the code that for showing/hiding a tab there is a logic concerning fields visibility inside them. It seems this logic fails when a tab is containing only a slot..