forked from mbk-lab/rui_orig
TableView bug fixing
This commit is contained in:
parent
736d30ae7b
commit
89cd7104eb
10
tableView.go
10
tableView.go
|
@ -139,11 +139,13 @@ const (
|
||||||
// TableView - text View
|
// TableView - text View
|
||||||
type TableView interface {
|
type TableView interface {
|
||||||
View
|
View
|
||||||
|
ParanetView
|
||||||
ReloadTableData()
|
ReloadTableData()
|
||||||
}
|
}
|
||||||
|
|
||||||
type tableViewData struct {
|
type tableViewData struct {
|
||||||
viewData
|
viewData
|
||||||
|
cellViews []View
|
||||||
}
|
}
|
||||||
|
|
||||||
type tableCellView struct {
|
type tableCellView struct {
|
||||||
|
@ -166,6 +168,7 @@ func newTableView(session Session) View {
|
||||||
func (table *tableViewData) Init(session Session) {
|
func (table *tableViewData) Init(session Session) {
|
||||||
table.viewData.Init(session)
|
table.viewData.Init(session)
|
||||||
table.tag = "TableView"
|
table.tag = "TableView"
|
||||||
|
table.cellViews = []View{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *tableViewData) normalizeTag(tag string) string {
|
func (table *tableViewData) normalizeTag(tag string) string {
|
||||||
|
@ -379,6 +382,8 @@ func (table *tableViewData) htmlTag() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *tableViewData) htmlSubviews(self View, buffer *strings.Builder) {
|
func (table *tableViewData) htmlSubviews(self View, buffer *strings.Builder) {
|
||||||
|
table.cellViews = []View{}
|
||||||
|
|
||||||
content := table.getRaw(Content)
|
content := table.getRaw(Content)
|
||||||
if content == nil {
|
if content == nil {
|
||||||
return
|
return
|
||||||
|
@ -556,6 +561,7 @@ func (table *tableViewData) htmlSubviews(self View, buffer *strings.Builder) {
|
||||||
|
|
||||||
case View:
|
case View:
|
||||||
viewHTML(value, buffer)
|
viewHTML(value, buffer)
|
||||||
|
table.cellViews = append(table.cellViews, value)
|
||||||
|
|
||||||
case Color:
|
case Color:
|
||||||
buffer.WriteString(`<div style="display: inline; height: 1em; background-color: `)
|
buffer.WriteString(`<div style="display: inline; height: 1em; background-color: `)
|
||||||
|
@ -856,3 +862,7 @@ func (cell *tableCellView) cssStyle(self View, builder cssBuilder) {
|
||||||
builder.add("vertical-align", enumProperties[TableVerticalAlign].values[value])
|
builder.add("vertical-align", enumProperties[TableVerticalAlign].values[value])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (table *tableViewData) Views() []View {
|
||||||
|
return table.cellViews
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue