Cannot remove entries from custom module API actions

Wappler 7 beta 28
Windows 11
Node

ISSUE: when removing entries from the interface of a custom module, the entries cannot be removed, only replaced leading to the need to edit the JSON file directly to remove them.

I have a very simple node.js custom module which does nothing else but output an entry which is passed to it:

[{
  type: 'testfile_bug-testfile_bug',
  module : 'testfile_bug',
  action : 'testfile_bug',
  groupTitle : 'Mailer',
 groupIcon : 'fas fa-envelope comp-general',
  title : 'bug test file',
  icon : 'fas fa-solid fa-calculator comp-general',
  dataPickObject: true,
  usedModules : { },
  dataScheme: [ ],
  properties : [
    {
      group: 'Inputs',
      variables: [
        { name: 'actionName', 
        optionName: 'name', 
        title: 'Name', 
        type: 'text', 
        required: true, 
        defaultValue: 'entry1'
        baseName: "entry1"
        },
           {name: 'entry', 
          optionName: 'entry', 
          title: 'Entry', 
          type: 'text', 
          defaultValue: "", 
          serverDataBindings: true,
           help: 'The Entry'
           },
          { name: 'output', 
          optionName: 'output', 
          title: 'Output', 
          type: 'boolean', 
          defaultValue: false 
          } ] }, ]}]

and a simple .js routine to echo that value back

exports.testfile_bug = async function (options) {
    const entry = this.parseOptional(options.entry, '*', '');
    return entry
}

which i add to an API action

I run the action and examine the output which correctly response with a empty response.

{"entry1":""}

I then add an entry:


and re-run the action which responds with the entry correctly

{"entry1":"this is an entry"}

Now the problem!

i remove the entry and save

and the old entry is returned:

{"entry1":"this is an entry"}

examination of the .json file reveals the entry has NOT been removed from the json file

{
  "name": "entry1",
  "module": "testfile_bug",
  "action": "testfile_bug",
  "options": {
    "entry": "this is an entry"
  },
  "meta": [],
  "output": true
}

To remove the entry, the json file must be edited directly

bug report for sequence of events
wappler.zip (2.1 KB)

1 Like