Skip to content

Commit

Permalink
supply empty parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg committed Sep 23, 2023
1 parent 0139711 commit 1c00e66
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions antd/src/main/scala/demo/App.scala
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ object CSS extends js.Any
def renderTable =
section(
h2("Table"),
Table[TableItem]
Table[TableItem]()
.bordered(true)
.dataSourceVarargs(
new TableItem(1, "Mike", 32, "10 Downing St."),
Expand All @@ -109,8 +109,8 @@ object CSS extends js.Any
.setRender((_, tableItem, _) => Tag(tableItem.name).build),
ColumnGroupType[TableItem](
scala.scalajs.js.Array(
ColumnType[TableItem].setTitle("Age").setDataIndex("age").setKey("age"),
ColumnType[TableItem].setTitle("Address").setDataIndex("address").setKey("address")
ColumnType[TableItem]().setTitle("Age").setDataIndex("age").setKey("age"),
ColumnType[TableItem]().setTitle("Address").setDataIndex("address").setKey("address")
)
).setTitleReactElement("Age & Address")
)
Expand Down Expand Up @@ -146,7 +146,7 @@ object CSS extends js.Any

val renderSelect = section(
h2("Select"),
Select[String]
Select[String]()
.defaultValue(selectValue)
.onChange((changedValue, _) => updateSelectValue(changedValue))(
Select.Option("jack")("Jack"),
Expand All @@ -158,7 +158,7 @@ object CSS extends js.Any

val renderMultiSelect = section(
h2("Multiple select"),
Select[js.Array[String]]
Select[js.Array[String]]()
.defaultValue(js.Array(multiSelectValue: _*))
.mode(antdStrings.multiple)
.onChange((changedValue, _) => updateMultiSelectValue(changedValue.toList))(
Expand All @@ -171,7 +171,7 @@ object CSS extends js.Any

val renderGroupSelect = section(
h2("Select with grouped options"),
Select[String]
Select[String]()
.defaultValue(selectValue)
.onChange((changedValue, _) => updateSelectValue(changedValue))(
Select.OptGroup.label("Manager")(
Expand Down Expand Up @@ -211,7 +211,7 @@ object CSS extends js.Any

val renderForm = section(
h2("Form"),
Form[Seq[_]].onFinish { store =>
Form[Seq[_]]().onFinish { store =>
console.log("Form submitted", store)
}(
FormItem()(
Expand Down Expand Up @@ -435,7 +435,7 @@ object CSS extends js.Any
h2("Range Picker"),
DatePicker.PickerBaseProps.RangePicker
.RangePickerDateProps()
.showTime(RangeShowTimeObject[Moment].setFormat("HH:mm"))
.showTime(RangeShowTimeObject[Moment]().setFormat("HH:mm"))
.format("YYYY/MM/DD HH:mm")
.value(rangePickerValues)
.onChange { (values: RangeValue[Moment], formatString: js.Tuple2[String, String]) =>
Expand Down Expand Up @@ -466,7 +466,7 @@ object CSS extends js.Any
)
)

TreeSelect[js.Array[String]]
TreeSelect[js.Array[String]]()
.value(selectTreeValues)
.onChange((values, _, _) => updateSelectTreeValues(values))
.treeData(data)
Expand Down
2 changes: 1 addition & 1 deletion antd/src/main/scala/demo/CoordinatedDemo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object CoordinatedDemo {
.label("Gender")
.name("gender")
.rulesVarargs(AggregationRule().setRequired(true).setMessage("Please select your gender!'"))(
Select[String]
Select[String]()
.placeholder("Select a option and change input text above")
.onChange { (value, _) =>
form.setFields(
Expand Down
2 changes: 1 addition & 1 deletion monaco/src/main/scala/demo/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ interface Employee {
}

// configure typescript to be strict
monaco.languages.typescript.typescriptDefaults.getCompilerOptions.setStrict(true)
monaco.languages.typescript.typescriptDefaults.getCompilerOptions().setStrict(true)
}
.width("600")
.height("800")
Expand Down
4 changes: 2 additions & 2 deletions react-dnd/src/main/scala/demo/App.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object Dustbin {
useDrop(
DropTargetHookSpec[js.Object, DropResult, Collected](ItemTypes.BOX)
.setDrop((_, _) => new DropResult("Dustbin"))
.setCollect(monitor => Collected(monitor.isOver, monitor.canDrop))
.setCollect(monitor => Collected(monitor.isOver(), monitor.canDrop()))
)

val isActive = canDrop && isOver
Expand Down Expand Up @@ -89,7 +89,7 @@ object Box {
alert(s"You dropped ${item.name} into ${dropResult.asInstanceOf[Dustbin.DropResult].name}!")
}
}
.setCollect(monitor => monitor.isDragging)
.setCollect(monitor => monitor.isDragging())
)

val opacity = if (isDragging) "0.4" else "1"
Expand Down

1 comment on commit 1c00e66

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.