小编vag*_*lis的帖子

如何以编程方式清除ui-select?

我想找到一种方法来清除代码选择ui-select.

例如,我有以下代码

<ui-select ng-model="selectedCustomerCode" ng-if="CustomerIds.length>1" on-select="CustomerCodeFiltersOnSelectCallback($item, $model)" theme="bootstrap">
  <ui-select-match class="ui-select-match" allow-clear="true" placeholder="??????? ??????? ??????...">{{$select.selected.CCode}}</ui-select-match>
  <ui-select-choices class="ui-select-choices" repeat="customer in CustomerIds | propsFilter: {CCode: $select.search}">
    <div ng-bind-html="customer.CCode | highlight: $select.search"></div>
  </ui-select-choices>
</ui-select>
Run Code Online (Sandbox Code Playgroud)

我想碰上一个清晰的按钮并清除一些输入,包括ui-select.清除ui-select的代码是什么?

angularjs ui-select

3
推荐指数
1
解决办法
5537
查看次数

Blazor 中的元素引用为 null

我有以下 html 剃刀代码

<StEyth @ref="stEyth"></StEyth>
<Gr1D @ref="gr1D" ></Gr1D>

 
Run Code Online (Sandbox Code Playgroud)

@code 中的以下代码

@code {     
 private Gr1D?  gr1D;
 private StEyth? stEyth;
 protected override async Task OnInitializedAsync()    
 {
   await updateView();
 }
 private async Task updateView()    
 {
   DrpdVal = new IpDrpdValues { ar1 = gr1D.ar1}
   await stEyth.updateView(DrpdVal);
 }
}
Run Code Online (Sandbox Code Playgroud)

但是当代码到达时 gr1D 为空

DrpdVal = new IpDrpdValues { ar1 = gr1D.ar1}
Run Code Online (Sandbox Code Playgroud)

知道为什么吗?我如何获取 Gr1D 中变量的值?

.net ref blazor

3
推荐指数
1
解决办法
3633
查看次数

标签 统计

.net ×1

angularjs ×1

blazor ×1

ref ×1

ui-select ×1