Skip to content

Commit

Permalink
Updated to bs4 styles #258
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Aug 22, 2024
1 parent 5045e20 commit 886ea06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions grails-app/assets/components/javascript/multi-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ko.components.register('multi-input', {
var self = this;

self.observableValues = ko.observableArray();
self.addValueText = params.addValueText;

// This method updates the values parameter with the contents of the managed array.
function syncValues() {
Expand Down
13 changes: 8 additions & 5 deletions grails-app/assets/components/template/multi-input.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<div data-bind="foreach: observableValues">
<div class="input-append">
<span data-bind="template:{nodes:$componentTemplateNodes}"></span><span class="add-on"
data-bind="click:$parent.removeValue"><i
class="fa fa-remove"></i></span>
<div class="input-group mb-1">
<!-- ko template: { nodes: $componentTemplateNodes } -->
<!-- /ko -->
<div class="input-group-append">
<span class="input-group-text" data-bind="click:$parent.removeValue"><i class="fa fa-remove"></i></span>
</div>

</div>
</div>
<i class="fa fa-plus" data-bind="click:addValue"></i>
<span><i class="fa fa-plus" data-bind="click:addValue"></i> <span data-bind="text:addValueText || 'Click to add'"></span></span>

0 comments on commit 886ea06

Please sign in to comment.