How to use the @bentley/ui-components.DropStatus.None function in @bentley/ui-components

To help you get started, we’ve selected a few @bentley/ui-components examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / widgets / demodataproviders / demoTableDataProvider.ts View on Github external
{
          key: "description", record: new PropertyRecord({
            value: description,
            valueFormat: PropertyValueFormat.Primitive,
            displayValue: description,
          }, {
            name: "description",
            displayLabel: "description",
            typename: "text",
          }),
        },
      ],
    };
    // if object has children, ie. is a non-leaf node of a tree, don't allow drop.
    if (children !== undefined && children.length > 0) {
      args.dropStatus = DropStatus.None;
      return args;
    }
    const exists = dataProvider === demoMutableTableDataProvider;
    if (args.row !== undefined) {
      if (exists && args.dropEffect === DropEffects.Move) {
        demoMutableTableDataProvider.moveRow(dragRow, args.row);
        args.dropStatus = DropStatus.Drop;
        args.local = true;
      } else {
        demoMutableTableDataProvider.insertRow(dragRow, args.row);
        args.dropStatus = DropStatus.Drop;
      }
    } else if (!exists) {
      demoMutableTableDataProvider.addRow(dragRow);
      args.dropStatus = DropStatus.Drop;
    }