mirror of
https://github.com/getrebuild/rebuild.git
synced 2025-09-07 23:26:56 +08:00
be: options of field
This commit is contained in:
parent
91ff6550a6
commit
1693f3afb5
3 changed files with 13 additions and 7 deletions
|
@ -48,12 +48,10 @@ public class MultiSelectManager extends PickListManager {
|
|||
* @return
|
||||
*/
|
||||
public String[] getLabels(long maskValue, Field field) {
|
||||
if (maskValue <= 0) {
|
||||
return new String[0];
|
||||
}
|
||||
if (maskValue <= 0) return new String[0];
|
||||
|
||||
List<String> labels = new ArrayList<>();
|
||||
ConfigBean[] entries = getPickListRaw(field, false);
|
||||
ConfigBean[] entries = getPickListRaw(field, true);
|
||||
for (ConfigBean e : entries) {
|
||||
long m = e.get("mask", Long.class);
|
||||
if ((maskValue & m) != 0) {
|
||||
|
|
|
@ -225,7 +225,7 @@ public class DataListWrapper {
|
|||
// @see MultiSelectManager#getLabels
|
||||
|
||||
List<Object> colorLabels = new ArrayList<>();
|
||||
ConfigBean[] entries = MultiSelectManager.instance.getPickListRaw(field, false);
|
||||
ConfigBean[] entries = MultiSelectManager.instance.getPickListRaw(field, true);
|
||||
for (ConfigBean e : entries) {
|
||||
long m = e.get("mask", Long.class);
|
||||
if (((long) originValue & m) != 0) {
|
||||
|
|
|
@ -2083,7 +2083,10 @@ class RbFormPickList extends RbFormElement {
|
|||
options.push({ id: props.value, text: '[DELETED]' })
|
||||
}
|
||||
}
|
||||
this._options = options
|
||||
this._options = options.filter((item) => {
|
||||
return item.hide !== true || (props.value && item.id === props.value)
|
||||
})
|
||||
|
||||
this._isShowRadio39 = props.showStyle === '10'
|
||||
this._htmlid = `${props.field}-${$random()}-`
|
||||
}
|
||||
|
@ -2910,7 +2913,12 @@ class RbFormMultiSelect extends RbFormElement {
|
|||
super(props)
|
||||
this._htmlid = `${props.field}-${$random()}_`
|
||||
this._isShowSelect41 = props.showStyle === '10'
|
||||
this._options = props.options || []
|
||||
this._options = (props.options || []).filter((item) => {
|
||||
if (props.value && props.value.id) {
|
||||
if ((props.value.id & item.mask) !== 0) return true
|
||||
}
|
||||
return item.hide !== true
|
||||
})
|
||||
}
|
||||
|
||||
renderElement() {
|
||||
|
|
Loading…
Add table
Reference in a new issue