I have an accordion type Macro control which has its properties residing in the side panel.
I can add panels to the accordion fine but if I want to Delete a panel from the accordion I use the splice to remove the item from the scope array but before I get chance to save the accordion the side panel closes.
My HTML looks like this:
<div class="simple-slider-list simple-slider-list-field" ng-class="{'simple-slider-open':selected == slide}" ng-click="select(slide)" ng-repeat="slide in model.value | orderBy: 'order'">
<span class="simple-slider-list-number">
{{slide.name}}
<!--<i class="icon right icon-navigation"></i>-->
<i ng-click="removeAccordionPanel(slide)" class="icon right icon-delete"></i>
</span>
<div class="simple-slider-list-field">
Order: <select name="mySelect" id="mySelect" style="width: 60px !important;"
ng-options="option for option in availableOptions track by option"
ng-model="slide.liveorder"></select>
</div>
<div class="simple-slider-list-field">
Title: <input type="text" placeholder="Title" ng-model="slide.name" />
</div>
<umb-editor model="slide.rte" ng-model="slide.rte"></umb-editor>
</div>
</div>
<div class="simple-slider-list-add-row">
<i ng-click="add()" class="icon right icon-add"></i>
</div>
Macro side panel - delete item closes panel
Hi,
I have an accordion type Macro control which has its properties residing in the side panel.
I can add panels to the accordion fine but if I want to Delete a panel from the accordion I use the splice to remove the item from the scope array but before I get chance to save the accordion the side panel closes.
My HTML looks like this:
My AngularJS controller looks like:
Looking at the code above this is my Delete panel function:
As soon as the $scope.model.value is reduced in size it closes the panel - It doesnt throw an error.
Any ideas?
Jon
Does anyone have any ideas?
Just found the issue: My delete button looks like:
If I change this to a Button it works:
is working on a reply...